summaryrefslogtreecommitdiff
path: root/libavcodec/kgv1dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/kgv1dec.c')
-rw-r--r--libavcodec/kgv1dec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index 328a555b62..5528c6f361 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -38,7 +38,7 @@ static void decode_flush(AVCodecContext *avctx)
{
KgvContext * const c = avctx->priv_data;
- av_frame_unref(c->prev);
+ av_frame_free(&c->prev);
}
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
@@ -155,13 +155,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
KgvContext * const c = avctx->priv_data;
- avctx->pix_fmt = AV_PIX_FMT_RGB555;
- avctx->flags |= CODEC_FLAG_EMU_EDGE;
-
c->prev = av_frame_alloc();
if (!c->prev)
return AVERROR(ENOMEM);
+ avctx->pix_fmt = AV_PIX_FMT_RGB555;
+ avctx->flags |= CODEC_FLAG_EMU_EDGE;
+
return 0;
}