Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
46c39f92
Commit
46c39f92
authored
Jun 28, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a segfault when --programs is used in the TS demuxer.
parent
3658e653
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
modules/demux/ts.c
modules/demux/ts.c
+23
-12
No files found.
modules/demux/ts.c
View file @
46c39f92
...
...
@@ -384,7 +384,7 @@ struct demux_sys_t
/* */
int
i_current_program
;
vlc_list_t
*
p_
programs_list
;
vlc_list_t
programs_list
;
/* TS dump */
char
*
psz_file
;
/* file to dump data in */
...
...
@@ -643,6 +643,8 @@ static int Open( vlc_object_t *p_this )
p_sys
->
b_dvb_meta
=
true
;
p_sys
->
b_access_control
=
true
;
p_sys
->
i_current_program
=
0
;
p_sys
->
programs_list
.
i_count
=
0
;
p_sys
->
programs_list
.
p_values
=
NULL
;
p_sys
->
i_tdt_delta
=
0
;
p_sys
->
i_dvb_start
=
0
;
p_sys
->
i_dvb_length
=
0
;
...
...
@@ -885,12 +887,7 @@ static void Close( vlc_object_t *p_this )
TAB_CLEAN
(
p_sys
->
i_pmt
,
p_sys
->
pmt
);
if
(
p_sys
->
p_programs_list
)
{
vlc_value_t
val
;
val
.
p_list
=
p_sys
->
p_programs_list
;
var_FreeList
(
&
val
,
NULL
);
}
free
(
p_sys
->
programs_list
.
p_values
);
/* If in dump mode, then close the file */
if
(
p_sys
->
b_file_out
)
...
...
@@ -1400,7 +1397,21 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
else
{
p_sys
->
i_current_program
=
-
1
;
p_sys
->
p_programs_list
=
p_list
;
p_sys
->
programs_list
.
i_count
=
0
;
if
(
p_list
)
{
vlc_list_t
*
p_dst
=
&
p_sys
->
programs_list
;
free
(
p_dst
->
p_values
);
p_dst
->
p_values
=
calloc
(
p_list
->
i_count
,
sizeof
(
*
p_dst
->
p_values
)
);
if
(
p_dst
->
p_values
)
{
p_dst
->
i_count
=
p_list
->
i_count
;
for
(
int
i
=
0
;
i
<
p_list
->
i_count
;
i
++
)
p_dst
->
p_values
[
i
]
=
p_list
->
p_values
[
i
];
}
}
}
return
VLC_SUCCESS
;
}
...
...
@@ -2587,17 +2598,17 @@ static bool ProgramIsSelected( demux_t *p_demux, uint16_t i_pgrm )
if
(
!
p_sys
->
b_access_control
)
return
false
;
if
(
(
p_sys
->
i_current_program
==
-
1
&&
p_sys
->
p
_programs_list
==
NULL
)
||
if
(
(
p_sys
->
i_current_program
==
-
1
&&
p_sys
->
p
rograms_list
.
i_count
==
0
)
||
p_sys
->
i_current_program
==
0
)
return
true
;
if
(
p_sys
->
i_current_program
==
i_pgrm
)
return
true
;
if
(
p_sys
->
p
_programs_list
!=
NULL
)
if
(
p_sys
->
p
rograms_list
.
i_count
!=
0
)
{
for
(
int
i
=
0
;
i
<
p_sys
->
p
_programs_list
->
i_count
;
i
++
)
for
(
int
i
=
0
;
i
<
p_sys
->
p
rograms_list
.
i_count
;
i
++
)
{
if
(
i_pgrm
==
p_sys
->
p
_programs_list
->
p_values
[
i
].
i_int
)
if
(
i_pgrm
==
p_sys
->
p
rograms_list
.
p_values
[
i
].
i_int
)
return
true
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment