Mercurial > libavformat.hg
changeset 5002:dc92e7858140 libavformat
broken stsd length might be < 16, fix elst-assert.mp4
author | bcoudurier |
---|---|
date | Wed, 03 Jun 2009 23:13:53 +0000 |
parents | 4da68099d180 |
children | e1749e19c60b |
files | mov.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Wed Jun 03 22:36:59 2009 +0000 +++ b/mov.c Wed Jun 03 23:13:53 2009 +0000 @@ -763,15 +763,17 @@ for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) { //Parsing Sample description table enum CodecID id; - int dref_id; + int dref_id = 1; MOVAtom a = { 0, 0, 0 }; int64_t start_pos = url_ftell(pb); int size = get_be32(pb); /* size */ uint32_t format = get_le32(pb); /* data format */ - get_be32(pb); /* reserved */ - get_be16(pb); /* reserved */ - dref_id = get_be16(pb); + if (size >= 16) { + get_be32(pb); /* reserved */ + get_be16(pb); /* reserved */ + dref_id = get_be16(pb); + } if (st->codec->codec_tag && st->codec->codec_tag != format &&