Browse Source

mpc8: Initialize AVFrame properly

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
e15e5328a7
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavcodec/mpc8.c

+ 3
- 3
libavcodec/mpc8.c View File

@@ -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;
}



Loading…
Cancel
Save