aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-17 01:16:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-07 03:31:29 +0100
commit2fe67ddb243e16788f32c5e18abd48315ba1b8de (patch)
tree03d54d3103037579dc586a1979d38759f46837c8 /libavcodec
parentb7cb77a3228f19e9550f7cb917dc270a553a4fd1 (diff)
downloadffmpeg-2fe67ddb243e16788f32c5e18abd48315ba1b8de.tar.gz
Merge commit 'b7462a3904d71ff799584faf5b875cad59ca2f31'
* commit 'b7462a3904d71ff799584faf5b875cad59ca2f31': jvdec: use the AVFrame API properly. Conflicts: libavcodec/jvdec.c See: 678431d3f2c5f35fe48b02d5035604ace742be2e Merged-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ddfdcd2b5ecce0914c1eefa6269060bdbc879b17) Author of the merged code: Anton Khirnov Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jvdec.c6
1 files 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;
}