*/
/**
- * @file cinepak.c
+ * @file
* Cinepak video decoder
* by Ewald Snel <ewald@rambo.its.tudelft.nl>
* For more information on the Cinepak algorithm, visit:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
if ((s->data + 12) > eod)
return -1;
- s->strips[i].id = AV_RB16 (s->data);
+ s->strips[i].id = s->data[0];
s->strips[i].y1 = y0;
s->strips[i].x1 = 0;
s->strips[i].y2 = y0 + AV_RB16 (&s->data[8]);
static int cinepak_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;
CinepakContext *s = avctx->priv_data;
s->data = buf;
AVCodec cinepak_decoder = {
"cinepak",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_CINEPAK,
sizeof(CinepakContext),
cinepak_decode_init,