From 998c9f15d1ca8c7489775ebcca51623b915988f1 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 8 Aug 2014 08:11:20 -0700 Subject: idct: remove call to ff_idctdsp_init from ff_MPV_common_init One step in untangling the mpegvideo code and fixing some problems in the order that initialization is being done in h263dec and h261dec. --- libavcodec/h263dec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libavcodec/h263dec.c') diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index cdd55446c7..a6d16b7258 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -113,9 +113,11 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) /* for h263, we allocate the images after having read the header */ if (avctx->codec->id != AV_CODEC_ID_H263 && - avctx->codec->id != AV_CODEC_ID_MPEG4) + avctx->codec->id != AV_CODEC_ID_MPEG4) { + ff_mpv_idct_init(s); if ((ret = ff_MPV_common_init(s)) < 0) return ret; + } ff_h263dsp_init(&s->h263dsp); ff_qpeldsp_init(&s->qdsp); @@ -414,10 +416,12 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, if (ret < 0) return ret; - if (!s->context_initialized) + if (!s->context_initialized) { // we need the idct permutaton for reading a custom matrix + ff_mpv_idct_init(s); if ((ret = ff_MPV_common_init(s)) < 0) return ret; + } /* We need to set current_picture_ptr before reading the header, * otherwise we cannot store anyting in there */ -- cgit v1.2.3