From 2fe67ddb243e16788f32c5e18abd48315ba1b8de Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 17 Nov 2013 01:16:26 +0100 Subject: [PATCH] Merge commit 'b7462a3904d71ff799584faf5b875cad59ca2f31' * commit 'b7462a3904d71ff799584faf5b875cad59ca2f31': jvdec: use the AVFrame API properly. Conflicts: libavcodec/jvdec.c See: 678431d3f2c5f35fe48b02d5035604ace742be2e Merged-by: Michael Niedermayer (cherry picked from commit ddfdcd2b5ecce0914c1eefa6269060bdbc879b17) Author of the merged code: Anton Khirnov Signed-off-by: Michael Niedermayer --- libavcodec/jvdec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 740884ad3b..cad053289a 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -41,11 +41,13 @@ typedef struct JvContext { static av_cold int decode_init(AVCodecContext *avctx) { JvContext *s = avctx->priv_data; - avctx->pix_fmt = AV_PIX_FMT_PAL8; - ff_dsputil_init(&s->dsp, avctx); + s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM); + + avctx->pix_fmt = AV_PIX_FMT_PAL8; + ff_dsputil_init(&s->dsp, avctx); return 0; }