aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2015-10-01 22:01:27 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-02 18:08:36 +0200
commit74ef5449a6fb64f4c4be4bfd470dc17de5ecb561 (patch)
treea0fe0d81005849e4ca11ecc414deb7de6df58138
parentc7e14a279fa7348db10ec824bb2d67858cb1c1ca (diff)
downloadffmpeg-74ef5449a6fb64f4c4be4bfd470dc17de5ecb561.tar.gz
dnxhddec: init scantable once permutation is set
Otherwise, the dsp may change without its permuation being applied. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dnxhddec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index fce0fc93e5..296f7f74d6 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -127,8 +127,6 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, uint32_t cid)
ctx->cid_table->run_bits, 1, 1,
ctx->cid_table->run_codes, 2, 2, 0);
- ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable,
- ff_zigzag_direct);
ctx->cid = cid;
}
return 0;
@@ -211,6 +209,8 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
if (ctx->bit_depth != old_bit_depth) {
ff_blockdsp_init(&ctx->bdsp, ctx->avctx);
ff_idctdsp_init(&ctx->idsp, ctx->avctx);
+ ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable,
+ ff_zigzag_direct);
}
cid = AV_RB32(buf + 0x28);