summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2010-04-22 21:43:36 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2010-04-22 21:43:36 +0000
commitcc8538ff939e3b0d3fd5430e7f82439daf83f9f3 (patch)
tree5e205bc8826b49f2a0d0e1e22a36ef46168ed2d0 /libavcodec
parent84368aa629fb3b98768142439df6a15c3fca0dfe (diff)
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
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 182e4fbcb0..0f9052ec26 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);
}
/**