diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-11-27 21:55:28 +0100 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-11-28 16:41:48 +0100 |
commit | 16af29a7a6deff3f6081fca1e36ad96cf8fec77d (patch) | |
tree | 71f8b2ef9cbdc5b2ce950cbfd8ef17e49305043b /libavcodec/vc1dec.c | |
parent | 92947c6d72783a8b624c82af14a2cbebcd4f031c (diff) | |
download | ffmpeg-16af29a7a6deff3f6081fca1e36ad96cf8fec77d.tar.gz |
vc1dec: add hacks to ensure static tables are initialized in open().
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b6d59c9948..f5c532985c 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5180,6 +5180,15 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) if (ff_vc1_init_common(v) < 0) 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); if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) { |