Mercurial > libavformat.hg
changeset 5250:4b736fd7d0fd libavformat
matroskadec: fix handling of A_MS/ACM track with no extradata
author | aurel |
---|---|
date | Thu, 01 Oct 2009 21:14:05 +0000 |
parents | 8e78fee99db5 |
children | 75a5bf71fad3 |
files | matroskadec.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Thu Oct 01 17:32:22 2009 +0000 +++ b/matroskadec.c Thu Oct 01 21:14:05 2009 +0000 @@ -1248,13 +1248,13 @@ codec_id = ff_codec_get_id(ff_codec_bmp_tags, track->video.fourcc); extradata_offset = 40; } else if (!strcmp(track->codec_id, "A_MS/ACM") - && track->codec_priv.size >= 18 + && track->codec_priv.size >= 14 && track->codec_priv.data != NULL) { init_put_byte(&b, track->codec_priv.data, track->codec_priv.size, URL_RDONLY, NULL, NULL, NULL, NULL); ff_get_wav_header(&b, st->codec, track->codec_priv.size); codec_id = st->codec->codec_id; - extradata_offset = 18; + extradata_offset = FFMIN(track->codec_priv.size, 18); } else if (!strcmp(track->codec_id, "V_QUICKTIME") && (track->codec_priv.size >= 86) && (track->codec_priv.data != NULL)) {