[FFmpeg-cvslog] mpc8: 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:45:44 2012 +0200| [e15e5328a7ad008d111e64d49708894ec6280eed] | committer: Michael Niedermayer

mpc8: Initialize AVFrame properly

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

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

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

diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 3b98b5f..d9594ec 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -143,6 +143,9 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
     avctx->channel_layout = (channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
     avctx->channels = channels;
 
+    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");
 
@@ -234,9 +237,6 @@ static av_cold int mpc8_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