summaryrefslogtreecommitdiff
path: root/libavcodec/mdec.c
diff options
context:
space:
mode:
authorJames Darnley <jdarnley@obe.tv>2017-06-17 03:13:36 +0200
committerJames Darnley <jdarnley@obe.tv>2017-06-20 13:59:51 +0200
commit9d11fedd1129565c8ba9e90b08b43e06f441b4fb (patch)
tree081f0e9b6f6460f5293ef53c9f0508261aafe0ed /libavcodec/mdec.c
parentd2597fb0c1c8e4964becf809f03abfa6596a8c14 (diff)
avcodec/mdec: override IDCT choice before initing DSP structs
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r--libavcodec/mdec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 8e28aa04f0..97bfebbeb7 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -213,6 +213,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
MDECContext * const a = avctx->priv_data;
+ if (avctx->idct_algo == FF_IDCT_AUTO)
+ avctx->idct_algo = FF_IDCT_SIMPLE;
+
a->mb_width = (avctx->coded_width + 15) / 16;
a->mb_height = (avctx->coded_height + 15) / 16;
@@ -225,8 +228,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
ff_init_scantable(a->idsp.idct_permutation, &a->scantable,
ff_zigzag_direct);
- if (avctx->idct_algo == FF_IDCT_AUTO)
- avctx->idct_algo = FF_IDCT_SIMPLE;
avctx->pix_fmt = AV_PIX_FMT_YUVJ420P;
avctx->color_range = AVCOL_RANGE_JPEG;