diff ac3dec.c @ 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 998691d7f8f5
children 0c98bdb71f48
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);
 }
 
 /**