]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rl2.c
Silicon Graphics Movie (.mv) demuxer
[ffmpeg] / libavcodec / rl2.c
index c51fbd5873a7aeea1c8cf54523ab2ba62174a98e..642d31af32262f568c2d6dce86b41bc2b04205a6 100644 (file)
@@ -34,6 +34,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
+#include "internal.h"
 
 
 #define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr count, palette
@@ -172,7 +173,7 @@ static av_cold int rl2_decode_init(AVCodecContext *avctx)
 
 
 static int rl2_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -185,7 +186,7 @@ static int rl2_decode_frame(AVCodecContext *avctx,
 
     /** get buffer */
     s->frame.reference= 0;
-    if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
         av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
@@ -196,7 +197,7 @@ static int rl2_decode_frame(AVCodecContext *avctx,
     /** make the palette available on the way out */
     memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     /** report that the buffer was completely consumed */