diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2009-10-01 21:14:05 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2009-10-01 21:14:05 +0000 |
commit | 038146e9cfac37941541d788e769a32f9d94e14a (patch) | |
tree | a5cf8c6337b148bba65ff21e0502115bf1411bac /libavformat/matroskadec.c | |
parent | 22a7e19b50cc1627dd16e22c5e89b1f92f1d0c0e (diff) | |
download | ffmpeg-038146e9cfac37941541d788e769a32f9d94e14a.tar.gz |
matroskadec: fix handling of A_MS/ACM track with no extradata
Originally committed as revision 20131 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 319aea0037..1dc2d22ad9 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1248,13 +1248,13 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) 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)) { |