[FFmpeg-cvslog] mpc7: Initialize AVFrame properly

Michael Niedermayer git at videolan.org
Thu Jul 26 18:08:14 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jul 26 17:42:08 2012 +0200| [5938b4d3983ca39bc37cf70d5920c2ca29ea51cd] | committer: Michael Niedermayer

mpc7: Initialize AVFrame properly

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

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

 libavcodec/mpc7.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 0a45826..48cd302 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -97,6 +97,9 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;
     avctx->channel_layout = AV_CH_LAYOUT_STEREO;
 
+    avcodec_get_frame_defaults(&c->frame);
+    avctx->coded_frame = &c->frame;
+
     if(vlc_initialized) return 0;
     av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
     scfi_vlc.table = scfi_table;
@@ -137,9 +140,6 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
     }
     vlc_initialized = 1;
 
-    avcodec_get_frame_defaults(&c->frame);
-    avctx->coded_frame = &c->frame;
-
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list