adxenc: fix error in merging from qatar
authorPaul B Mahol <onemda@gmail.com>
Sat, 24 Mar 2012 15:28:51 +0000 (15:28 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 24 Mar 2012 16:52:53 +0000 (17:52 +0100)
Pointed out by FATE.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/adxenc.c

index ca472e0..bcb8967 100644 (file)
@@ -118,9 +118,8 @@ static av_cold int adx_encode_init(AVCodecContext *avctx)
     avctx->frame_size = BLOCK_SAMPLES;
 
 #if FF_API_OLD_ENCODE_AUDIO
-    avctx->coded_frame = avcodec_alloc_frame();
-    if (!avctx->coded_frame)
-        return AVERROR(ENOMEM);
+    avcodec_get_frame_defaults(&c->frame);
+    avctx->coded_frame = &c->frame;
 #endif
 
     /* the cutoff can be adjusted, but this seems to work pretty well */