You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
mpc7: Initialize AVFrame properly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -97,6 +97,9 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
|
|||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
|
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
|
||||||
|
|
||||||
|
avcodec_get_frame_defaults(&c->frame);
|
||||||
|
avctx->coded_frame = &c->frame;
|
||||||
|
|
||||||
if(vlc_initialized) return 0;
|
if(vlc_initialized) return 0;
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
|
av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
|
||||||
scfi_vlc.table = scfi_table;
|
scfi_vlc.table = scfi_table;
|
||||||
@@ -137,9 +140,6 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
|
|||||||
}
|
}
|
||||||
vlc_initialized = 1;
|
vlc_initialized = 1;
|
||||||
|
|
||||||
avcodec_get_frame_defaults(&c->frame);
|
|
||||||
avctx->coded_frame = &c->frame;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user