diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2010-01-24 23:55:33 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2010-01-24 23:55:33 +0000 |
commit | 008f872f614e6646c5b1fc8888e40bea4796eb5f (patch) | |
tree | 59cbe9527a47fe36e13d8b24ee321976fbdff3cc | |
parent | b52fcba9cd82571ea404b3848bc796934bd3cf69 (diff) | |
download | ffmpeg-008f872f614e6646c5b1fc8888e40bea4796eb5f.tar.gz |
Only check frame size if the header is valid.
Originally committed as revision 21439 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ac3dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index ba7ae16711..8b78a0a50c 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1237,7 +1237,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, err = parse_frame_header(s); /* check that reported frame size fits in input buffer */ - if(s->frame_size > buf_size) { + if(!err && s->frame_size > buf_size) { av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); err = AAC_AC3_PARSE_ERROR_FRAME_SIZE; } |