Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ad6c7c1b
Commit
ad6c7c1b
authored
Aug 24, 2011
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4: Handle non-trivial ES Descriptors.
parent
d4b99744
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
isom.c
libavformat/isom.c
+16
-0
isom.h
libavformat/isom.h
+1
-0
mov.c
libavformat/mov.c
+1
-2
mpegts.c
libavformat/mpegts.c
+1
-2
No files found.
libavformat/isom.c
View file @
ad6c7c1b
...
...
@@ -372,6 +372,22 @@ int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
return
len
;
}
void
ff_mp4_parse_es_descr
(
AVIOContext
*
pb
,
int
*
es_id
)
{
int
flags
;
if
(
es_id
)
*
es_id
=
avio_rb16
(
pb
);
else
avio_rb16
(
pb
);
flags
=
avio_r8
(
pb
);
if
(
flags
&
0x80
)
//streamDependenceFlag
avio_rb16
(
pb
);
if
(
flags
&
0x40
)
{
//URL_Flag
int
len
=
avio_r8
(
pb
);
avio_skip
(
pb
,
len
);
}
if
(
flags
&
0x20
)
//OCRstreamFlag
avio_rb16
(
pb
);
}
static
const
AVCodecTag
mp4_audio_types
[]
=
{
{
CODEC_ID_MP3ON4
,
AOT_PS
},
/* old mp3on4 draft */
{
CODEC_ID_MP3ON4
,
AOT_L1
},
/* layer 1 */
...
...
libavformat/isom.h
View file @
ad6c7c1b
...
...
@@ -146,6 +146,7 @@ typedef struct MOVContext {
int
ff_mp4_read_descr_len
(
AVIOContext
*
pb
);
int
ff_mp4_read_descr
(
AVFormatContext
*
fc
,
AVIOContext
*
pb
,
int
*
tag
);
int
ff_mp4_read_dec_config_descr
(
AVFormatContext
*
fc
,
AVStream
*
st
,
AVIOContext
*
pb
);
void
ff_mp4_parse_es_descr
(
AVIOContext
*
pb
,
int
*
es_id
);
#define MP4IODescrTag 0x02
#define MP4ESDescrTag 0x03
...
...
libavformat/mov.c
View file @
ad6c7c1b
...
...
@@ -473,8 +473,7 @@ int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom)
avio_rb32
(
pb
);
/* version + flags */
ff_mp4_read_descr
(
fc
,
pb
,
&
tag
);
if
(
tag
==
MP4ESDescrTag
)
{
avio_rb16
(
pb
);
/* ID */
avio_r8
(
pb
);
/* priority */
ff_mp4_parse_es_descr
(
pb
,
NULL
);
}
else
avio_rb16
(
pb
);
/* ID */
...
...
libavformat/mpegts.c
View file @
ad6c7c1b
...
...
@@ -886,9 +886,8 @@ static int mp4_read_iods(AVFormatContext *s, const uint8_t *buf, unsigned size,
avio_r8
(
&
pb
);
len
=
ff_mp4_read_descr
(
s
,
&
pb
,
&
tag
);
if
(
tag
==
MP4ESDescrTag
)
{
*
es_id
=
avio_rb16
(
&
pb
);
/* ES_ID */
ff_mp4_parse_es_descr
(
&
pb
,
es_id
);
av_dlog
(
s
,
"ES_ID %#x
\n
"
,
*
es_id
);
avio_r8
(
&
pb
);
/* priority */
len
=
ff_mp4_read_descr
(
s
,
&
pb
,
&
tag
);
if
(
tag
==
MP4DecConfigDescrTag
)
{
*
dec_config_descr
=
av_malloc
(
len
);
...
...
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