Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
69a042ee
Commit
69a042ee
authored
Feb 05, 2013
by
Peter Ross
Committed by
Michael Niedermayer
Oct 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegts: demux synchronous SMPTE 336M Key-Length-Value (KLV) metadata
Fixes ticket #2579.
parent
162126bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
mpegts.c
libavformat/mpegts.c
+20
-0
No files found.
libavformat/mpegts.c
View file @
69a042ee
...
...
@@ -640,6 +640,11 @@ static const StreamType REGD_types[] = {
{
0
},
};
static
const
StreamType
METADATA_types
[]
=
{
{
MKTAG
(
'K'
,
'L'
,
'V'
,
'A'
),
AVMEDIA_TYPE_DATA
,
AV_CODEC_ID_SMPTE_KLV
},
{
0
},
};
/* descriptor present */
static
const
StreamType
DESC_types
[]
=
{
{
0x6a
,
AVMEDIA_TYPE_AUDIO
,
AV_CODEC_ID_AC3
},
/* AC-3 descriptor */
...
...
@@ -1002,6 +1007,12 @@ static int mpegts_push_data(MpegTSFilter *filter,
p
+=
sl_header_bytes
;
buf_size
-=
sl_header_bytes
;
}
if
(
pes
->
stream_type
==
0x15
&&
buf_size
>=
5
)
{
/* skip metadata access unit header */
pes
->
pes_header_size
+=
5
;
p
+=
5
;
buf_size
-=
5
;
}
if
(
pes
->
ts
->
fix_teletext_pts
&&
pes
->
st
->
codec
->
codec_id
==
AV_CODEC_ID_DVB_TELETEXT
)
{
AVProgram
*
p
=
NULL
;
while
((
p
=
av_find_program_from_stream
(
pes
->
stream
,
p
,
pes
->
st
->
index
)))
{
...
...
@@ -1489,6 +1500,15 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
case
0x52
:
/* stream identifier descriptor */
st
->
stream_identifier
=
1
+
get8
(
pp
,
desc_end
);
break
;
case
0x26
:
/* metadata descriptor */
if
(
get16
(
pp
,
desc_end
)
==
0xFFFF
)
*
pp
+=
4
;
if
(
get8
(
pp
,
desc_end
)
==
0xFF
)
{
st
->
codec
->
codec_tag
=
bytestream_get_le32
(
pp
);
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_NONE
)
mpegts_find_stream_type
(
st
,
st
->
codec
->
codec_tag
,
METADATA_types
);
}
break
;
default:
break
;
}
...
...
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