[FFmpeg-cvslog] avcodec/adpcmenc: Use FF_ALLOC_ARRAY_OR_GOTO()

Michael Niedermayer git at videolan.org
Wed Sep 10 15:18:45 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 10 14:37:12 2014 +0200| [8b7a39d7ea4b716608c4091cd25ae6c88bd0251a] | committer: Michael Niedermayer

avcodec/adpcmenc: Use FF_ALLOC_ARRAY_OR_GOTO()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b7a39d7ea4b716608c4091cd25ae6c88bd0251a
---

 libavcodec/adpcmenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 06dee35..ea6cc23 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -509,7 +509,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
         /* stereo: 4 bytes (8 samples) for left, 4 bytes for right */
         if (avctx->trellis > 0) {
-            FF_ALLOC_OR_GOTO(avctx, buf, avctx->channels * blocks * 8, error);
+            FF_ALLOC_ARRAY_OR_GOTO(avctx, buf, avctx->channels, blocks * 8, error);
             for (ch = 0; ch < avctx->channels; ch++) {
                 adpcm_compress_trellis(avctx, &samples_p[ch][1],
                                        buf + ch * blocks * 8, &c->status[ch],



More information about the ffmpeg-cvslog mailing list