diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-08-24 16:59:30 -0700 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2011-08-25 11:53:21 -0700 |
commit | ad6c7c1b525c7ae365491b4fef7869d31ee88329 (patch) | |
tree | ec0e580b4d5657d1ca4d98e3537eb27941c4a6fc /libavformat/isom.c | |
parent | d4b9974465baf893e90527a366e7a7411ded1ef8 (diff) | |
download | ffmpeg-ad6c7c1b525c7ae365491b4fef7869d31ee88329.tar.gz |
mp4: Handle non-trivial ES Descriptors.
Diffstat (limited to 'libavformat/isom.c')
-rw-r--r-- | libavformat/isom.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c index eb17e25474..7d42e80070 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -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 */ |