From e15e5328a7ad008d111e64d49708894ec6280eed Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 26 Jul 2012 17:45:44 +0200 Subject: [PATCH] mpc8: Initialize AVFrame properly Signed-off-by: Michael Niedermayer --- libavcodec/mpc8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 3b98b5f709..d9594ec900 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; }