From: Justin Ruggles Date: Thu, 22 Apr 2010 21:43:36 +0000 (+0000) Subject: ac3dec: return smaller of buf_size and frame_size instead of always returning X-Git-Tag: v0.6~174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc8538ff939e3b0d3fd5430e7f82439daf83f9f3;p=platform%2Fupstream%2Flibav.git ac3dec: return smaller of buf_size and frame_size instead of always returning frame_size. Originally committed as revision 22950 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 182e4fb..0f9052e 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1420,7 +1420,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, out_samples += 256 * s->out_channels; } *data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t); - return s->frame_size; + return FFMIN(buf_size, s->frame_size); } /**