diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-03-15 23:54:53 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-03-15 23:54:53 +0000 |
commit | df8843c65f4d23ceadfc8f78a63d4d1632e55c38 (patch) | |
tree | 07956669ec3e6c7b3f44f4f654d37410f141dec3 /libavformat | |
parent | 06abe7f5b423ecd958c1460b08e1c7b43372938d (diff) | |
download | ffmpeg-df8843c65f4d23ceadfc8f78a63d4d1632e55c38.tar.gz |
search for hdlr atom in meta, some files do not store version+flags
Originally committed as revision 17996 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index fac6d0ccdf..10aaac2bd0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1338,9 +1338,16 @@ static int mov_read_ilst(MOVContext *c, ByteIOContext *pb, MOVAtom atom) static int mov_read_meta(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { - url_fskip(pb, 4); // version + flags - atom.size -= 4; - return mov_read_default(c, pb, atom); + while (atom.size > 8) { + uint32_t tag = get_le32(pb); + atom.size -= 4; + if (tag == MKTAG('h','d','l','r')) { + url_fseek(pb, -8, SEEK_CUR); + atom.size += 8; + return mov_read_default(c, pb, atom); + } + } + return 0; } static int mov_read_trkn(MOVContext *c, ByteIOContext *pb, MOVAtom atom) |