#include "internal.h"
typedef struct {
- AVFrame *prev;
- AVCodecContext *avctx;
+ uint16_t *frame_buffer;
+ uint16_t *last_frame_buffer;
} KgvContext;
static void decode_flush(AVCodecContext *avctx)
{
KgvContext * const c = avctx->priv_data;
- c->prev = av_frame_alloc();
- if (!c->prev)
- return AVERROR(ENOMEM);
-
- c->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_RGB555;
- avctx->flags |= CODEC_FLAG_EMU_EDGE;
return 0;
}
static av_cold int decode_end(AVCodecContext *avctx)
{
- decode_flush(avctx);
+ KgvContext * const c = avctx->priv_data;
- av_frame_free(&c->prev);
return 0;
}