changeset 11656:e6bff5319932 libavcodec

ac3dec: return smaller of buf_size and frame_size instead of always returning frame_size.
author jbr
date Thu, 22 Apr 2010 21:43:36 +0000
parents 7ad2eb6a2f10
children b37112450ec0
files ac3dec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Thu Apr 22 21:19:32 2010 +0000
+++ b/ac3dec.c	Thu Apr 22 21:43:36 2010 +0000
@@ -1420,7 +1420,7 @@
         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);
 }
 
 /**