Commit 16af29a7 authored by Reimar Döffinger's avatar Reimar Döffinger

vc1dec: add hacks to ensure static tables are initialized in open().

Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 92947c6d
...@@ -5180,6 +5180,15 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) ...@@ -5180,6 +5180,15 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
if (ff_vc1_init_common(v) < 0) if (ff_vc1_init_common(v) < 0)
return -1; return -1;
// ensure static VLC tables are initialized
if (ff_msmpeg4_decode_init(avctx) < 0)
return -1;
if (ff_vc1_decode_init_alloc_tables(v) < 0)
return -1;
// Hack to ensure the above functions will be called
// again once we know all necessary settings.
// That this is necessary might indicate a bug.
ff_vc1_decode_end(avctx);
ff_vc1dsp_init(&v->vc1dsp); ff_vc1dsp_init(&v->vc1dsp);
if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) { if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment