Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
92141e41
Commit
92141e41
authored
Mar 13, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ts: fix delayed es creation after filtering
parent
0aa39f4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
27 deletions
+22
-27
modules/demux/ts.c
modules/demux/ts.c
+22
-27
No files found.
modules/demux/ts.c
View file @
92141e41
...
...
@@ -507,7 +507,7 @@ static inline int PIDGet( block_t *p )
}
static
bool
GatherData
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
block_t
*
p_bk
);
static
void
AddAndCreateES
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
);
static
void
AddAndCreateES
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
bool
);
static
void
ProgramSetPCR
(
demux_t
*
p_demux
,
ts_pmt_t
*
p_prg
,
mtime_t
i_pcr
);
static
block_t
*
ReadTSPacket
(
demux_t
*
p_demux
);
...
...
@@ -1331,7 +1331,7 @@ static int Demux( demux_t *p_demux )
p_sys
->
b_end_preparse
=
true
;
if
(
p_sys
->
es_creation
==
DELAY_ES
)
/* No longer delay ES since that pid's program sends data */
{
AddAndCreateES
(
p_demux
,
NULL
);
AddAndCreateES
(
p_demux
,
p_pid
,
true
);
}
b_frame
=
GatherData
(
p_demux
,
p_pid
,
p_pkt
);
...
...
@@ -5053,36 +5053,33 @@ static void PMTParseEsIso639( demux_t *p_demux, ts_pes_es_t *p_es,
#endif
}
static
void
AddAndCreateES
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
)
static
void
AddAndCreateES
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
bool
b_create_delayed
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
bool
b_create_delayed
=
false
;
if
(
pid
)
if
(
b_create_delayed
)
p_sys
->
es_creation
=
CREATE_ES
;
if
(
pid
&&
p_sys
->
es_creation
==
CREATE_ES
)
{
if
(
SEEN
(
*
pid
)
&&
p_sys
->
es_creation
==
DELAY_ES
)
pid
->
u
.
p_pes
->
es
.
id
=
es_out_Add
(
p_demux
->
out
,
&
pid
->
u
.
p_pes
->
es
.
fmt
);
for
(
int
i
=
0
;
i
<
pid
->
u
.
p_pes
->
extra_es
.
i_size
;
i
++
)
{
p
_sys
->
es_creation
=
CREATE_ES
;
b_create_delayed
=
true
;
p
id
->
u
.
p_pes
->
extra_es
.
p_elems
[
i
]
->
id
=
es_out_Add
(
p_demux
->
out
,
&
pid
->
u
.
p_pes
->
extra_es
.
p_elems
[
i
]
->
fmt
)
;
}
p_sys
->
i_pmt_es
+=
1
+
pid
->
u
.
p_pes
->
extra_es
.
i_size
;
if
(
p_sys
->
es_creation
==
CREATE_ES
)
/* Update the default program == first created ES group */
if
(
p_sys
->
b_default_selection
)
{
pid
->
u
.
p_pes
->
es
.
id
=
es_out_Add
(
p_demux
->
out
,
&
pid
->
u
.
p_pes
->
es
.
fmt
);
for
(
int
i
=
0
;
i
<
pid
->
u
.
p_pes
->
extra_es
.
i_size
;
i
++
)
{
pid
->
u
.
p_pes
->
extra_es
.
p_elems
[
i
]
->
id
=
es_out_Add
(
p_demux
->
out
,
&
pid
->
u
.
p_pes
->
extra_es
.
p_elems
[
i
]
->
fmt
);
}
p_sys
->
i_pmt_es
+=
1
+
pid
->
u
.
p_pes
->
extra_es
.
i_size
;
UpdatePESFilters
(
p_demux
,
p_sys
->
b_es_all
);
p_sys
->
b_default_selection
=
false
;
assert
(
p_sys
->
programs
.
i_size
==
1
);
if
(
p_sys
->
programs
.
p_elems
[
0
]
!=
pid
->
p_parent
->
u
.
p_pmt
->
i_number
)
p_sys
->
programs
.
p_elems
[
0
]
=
pid
->
p_parent
->
u
.
p_pmt
->
i_number
;
msg_Dbg
(
p_demux
,
"Default program is %d"
,
pid
->
p_parent
->
u
.
p_pmt
->
i_number
);
}
}
else
if
(
p_sys
->
es_creation
==
DELAY_ES
)
{
p_sys
->
es_creation
=
CREATE_ES
;
b_create_delayed
=
true
;
}
if
(
b_create_delayed
)
{
...
...
@@ -5103,13 +5100,11 @@ static void AddAndCreateES( demux_t *p_demux, ts_pid_t *pid )
es_out_Add
(
p_demux
->
out
,
&
pid
->
u
.
p_pes
->
extra_es
.
p_elems
[
k
]
->
fmt
);
}
p_sys
->
i_pmt_es
+=
1
+
pid
->
u
.
p_pes
->
extra_es
.
i_size
;
if
(
pid
->
u
.
p_pes
->
es
.
id
!=
NULL
&&
ProgramIsSelected
(
p_sys
,
pid
->
p_parent
->
u
.
p_pmt
->
i_number
)
)
SetPIDFilter
(
p_sys
,
pid
,
true
);
}
}
UpdatePESFilters
(
p_demux
,
p_sys
->
b_es_all
);
}
UpdatePESFilters
(
p_demux
,
p_sys
->
b_es_all
);
}
static
void
PMTCallBack
(
void
*
data
,
dvbpsi_pmt_t
*
p_dvbpsipmt
)
...
...
@@ -5501,7 +5496,7 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
}
else
{
AddAndCreateES
(
p_demux
,
pespid
);
AddAndCreateES
(
p_demux
,
pespid
,
false
);
}
}
...
...
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