[FFmpeg-cvslog] r22950 - trunk/libavcodec/ac3dec.c

jbr subversion
Thu Apr 22 23:43:36 CEST 2010


Author: jbr
Date: Thu Apr 22 23:43:36 2010
New Revision: 22950

Log:
ac3dec: return smaller of buf_size and frame_size instead of always returning 
frame_size.

Modified:
   trunk/libavcodec/ac3dec.c

Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c	Thu Apr 22 23:19:32 2010	(r22949)
+++ trunk/libavcodec/ac3dec.c	Thu Apr 22 23:43:36 2010	(r22950)
@@ -1420,7 +1420,7 @@ static int ac3_decode_frame(AVCodecConte
         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);
 }
 
 /**



More information about the ffmpeg-cvslog mailing list