mirror of https://git.ffmpeg.org/ffmpeg.git
broken stsd length might be < 16, fix elst-assert.mp4
Originally committed as revision 19084 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
502d6c0a23
commit
281551131d
|
@ -763,15 +763,17 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
|
||||||
for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
|
for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
|
||||||
//Parsing Sample description table
|
//Parsing Sample description table
|
||||||
enum CodecID id;
|
enum CodecID id;
|
||||||
int dref_id;
|
int dref_id = 1;
|
||||||
MOVAtom a = { 0, 0, 0 };
|
MOVAtom a = { 0, 0, 0 };
|
||||||
int64_t start_pos = url_ftell(pb);
|
int64_t start_pos = url_ftell(pb);
|
||||||
int size = get_be32(pb); /* size */
|
int size = get_be32(pb); /* size */
|
||||||
uint32_t format = get_le32(pb); /* data format */
|
uint32_t format = get_le32(pb); /* data format */
|
||||||
|
|
||||||
get_be32(pb); /* reserved */
|
if (size >= 16) {
|
||||||
get_be16(pb); /* reserved */
|
get_be32(pb); /* reserved */
|
||||||
dref_id = get_be16(pb);
|
get_be16(pb); /* reserved */
|
||||||
|
dref_id = get_be16(pb);
|
||||||
|
}
|
||||||
|
|
||||||
if (st->codec->codec_tag &&
|
if (st->codec->codec_tag &&
|
||||||
st->codec->codec_tag != format &&
|
st->codec->codec_tag != format &&
|
||||||
|
|
Loading…
Reference in New Issue