*/
/**
- * @file kmvc.c
+ * @file
* Karl Morton's Video Codec decoder
*/
}
}
-static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, const uint8_t * buf,
- int buf_size)
+static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt)
{
+ const uint8_t *buf = avpkt->data;
+ int buf_size = avpkt->size;
KmvcContext *const ctx = avctx->priv_data;
uint8_t *out, *src;
int i;
c->avctx = avctx;
- c->pic.data[0] = NULL;
-
if (avctx->width > 320 || avctx->height > 200) {
av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n");
return -1;
return 0;
}
-AVCodec kmvc_decoder = {
+AVCodec ff_kmvc_decoder = {
"kmvc",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_KMVC,
sizeof(KmvcContext),
decode_init,
NULL,
decode_end,
decode_frame,
+ CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"),
};