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
762ddf5b
Commit
762ddf5b
authored
Mar 26, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ts: fix SL/FMC descriptors handling
parent
23c8d864
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
15 deletions
+55
-15
modules/demux/ts.c
modules/demux/ts.c
+55
-15
No files found.
modules/demux/ts.c
View file @
762ddf5b
...
@@ -4215,35 +4215,75 @@ static bool PMTEsHasComponentTag( const dvbpsi_pmt_es_t *p_es,
...
@@ -4215,35 +4215,75 @@ static bool PMTEsHasComponentTag( const dvbpsi_pmt_es_t *p_es,
return
p_si
->
i_component_tag
==
i_component_tag
;
return
p_si
->
i_component_tag
==
i_component_tag
;
}
}
static
const
es_mpeg4_descriptor_t
*
GetMPEG4DescByEsId
(
const
iod_descriptor_t
*
iod
,
uint16_t
i_es_id
)
{
if
(
iod
)
for
(
int
i
=
0
;
i
<
ES_DESCRIPTOR_COUNT
;
i
++
)
{
if
(
iod
->
es_descr
[
i
].
i_es_id
==
i_es_id
)
{
if
(
iod
->
es_descr
[
i
].
b_ok
)
return
&
iod
->
es_descr
[
i
];
}
}
return
NULL
;
}
static
void
PMTSetupEsISO14496
(
demux_t
*
p_demux
,
ts_pes_es_t
*
p_es
,
static
void
PMTSetupEsISO14496
(
demux_t
*
p_demux
,
ts_pes_es_t
*
p_es
,
const
ts_pmt_t
*
p_pmt
,
const
dvbpsi_pmt_es_t
*
p_dvbpsies
)
const
ts_pmt_t
*
p_pmt
,
const
dvbpsi_pmt_es_t
*
p_dvbpsies
)
{
{
es_format_t
*
p_fmt
=
&
p_es
->
fmt
;
es_format_t
*
p_fmt
=
&
p_es
->
fmt
;
/* MPEG-4 stream: search FMC_DESCRIPTOR (SL Packetized stream) */
const
dvbpsi_descriptor_t
*
p_dr
=
p_dvbpsies
->
p_first_descriptor
;
dvbpsi_descriptor_t
*
p_dr
=
PMTEsFindDescriptor
(
p_dvbpsies
,
0x1f
);
while
(
p_dr
)
if
(
p_dr
&&
p_dr
->
i_length
==
2
&&
p_pmt
->
iod
)
{
{
const
int
i_es_id
=
(
p_dr
->
p_data
[
0
]
<<
8
)
|
p_dr
->
p_data
[
1
]
;
const
es_mpeg4_descriptor_t
*
p_esdescr
=
NULL
;
uint16_t
i_es_id
;
msg_Dbg
(
p_demux
,
"found FMC_descriptor declaring sl packetization on es_id=%d"
,
i_es_id
)
;
uint8_t
i_length
=
p_dr
->
i_length
;
p_es
->
p_mpeg4desc
=
NULL
;
switch
(
p_dr
->
i_tag
)
{
case
0x1f
:
/* FMC Descriptor */
while
(
i_length
>=
3
&&
!
p_esdescr
)
{
i_es_id
=
(
p_dr
->
p_data
[
0
]
<<
8
)
|
p_dr
->
p_data
[
1
];
p_esdescr
=
GetMPEG4DescByEsId
(
p_pmt
->
iod
,
i_es_id
);
/* FIXME: add flexmux channel */
i_length
-=
3
;
if
(
p_esdescr
)
msg_Dbg
(
p_demux
,
"found FMC_descriptor declaring sl packetization on es_id=%"
PRIu16
,
i_es_id
);
}
break
;
case
0x1e
:
/* SL Descriptor */
if
(
i_length
==
2
)
{
i_es_id
=
(
p_dr
->
p_data
[
0
]
<<
8
)
|
p_dr
->
p_data
[
1
];
p_esdescr
=
GetMPEG4DescByEsId
(
p_pmt
->
iod
,
i_es_id
);
if
(
p_esdescr
)
msg_Dbg
(
p_demux
,
"found SL_descriptor declaring sl packetization on es_id=%"
PRIu16
,
i_es_id
);
}
break
;
default:
break
;
}
for
(
int
i
=
0
;
i
<
ES_DESCRIPTOR_COUNT
;
i
++
)
if
(
p_esdescr
)
{
{
iod_descriptor_t
*
iod
=
p_pmt
->
iod
;
if
(
!
p_esdescr
->
b_ok
)
if
(
iod
->
es_descr
[
i
].
i_es_id
==
i_es_id
)
{
{
if
(
iod
->
es_descr
[
i
].
b_ok
)
msg_Dbg
(
p_demux
,
"MPEG-4 descriptor not yet available on es_id=%"
PRIu16
,
i_es_id
);
p_es
->
p_mpeg4desc
=
&
iod
->
es_descr
[
i
];
}
else
else
msg_Dbg
(
p_demux
,
"MPEG-4 descriptor not yet available on es_id=%d"
,
i_es_id
);
{
p_es
->
p_mpeg4desc
=
p_esdescr
;
break
;
break
;
}
}
}
}
p_dr
=
p_dr
->
p_next
;
}
}
if
(
!
p_es
->
p_mpeg4desc
)
if
(
!
p_es
->
p_mpeg4desc
)
{
{
switch
(
p_dvbpsies
->
i_type
)
switch
(
p_dvbpsies
->
i_type
)
...
...
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