]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vmdav.c
Bump avcodec minor version for kgv1 decoder
[ffmpeg] / libavcodec / vmdav.c
index 1921c81ca2726e3be54c1046d6ab6183c3351b72..79318b027766600098cf8b73c4c7e3262ce9d8d2 100644 (file)
@@ -42,7 +42,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
 #include "libavutil/intreadwrite.h"
 #include "avcodec.h"
@@ -359,15 +358,15 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
         palette32[i] = (r << 16) | (g << 8) | (b);
     }
 
-    s->frame.data[0] = s->prev_frame.data[0] = NULL;
-
     return 0;
 }
 
 static int vmdvideo_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;
     VmdVideoContext *s = avctx->priv_data;
 
     s->buf = buf;
@@ -521,8 +520,10 @@ static int vmdaudio_loadsound(VmdAudioContext *s, unsigned char *data,
 
 static int vmdaudio_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;
     VmdAudioContext *s = avctx->priv_data;
     unsigned char *output_samples = (unsigned char *)data;