*/
/**
- * @file msvideo1.c
+ * @file libavcodec/msvideo1.c
* Microsoft Video-1 Decoder by Mike Melanson (melanson@pcisys.net)
* For more information about the MS Video-1 format, visit:
* http://www.pcisys.net/~melanson/codecs/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
+#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#define PALETTE_COUNT 256
} Msvideo1Context;
-static int msvideo1_decode_init(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
static int msvideo1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- const uint8_t *buf, int buf_size)
+ AVPacket *avpkt)
{
+ const uint8_t *buf = avpkt->data;
+ int buf_size = avpkt->size;
Msvideo1Context *s = avctx->priv_data;
s->buf = buf;
return buf_size;
}
-static int msvideo1_decode_end(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
msvideo1_decode_end,
msvideo1_decode_frame,
CODEC_CAP_DR1,
+ .long_name= NULL_IF_CONFIG_SMALL("Microsoft Video 1"),
};