]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/yop.c
Merge commit 'f1d8763a02b5fce9a7d9789e049d74a45b15e1e8'
[ffmpeg] / libavcodec / yop.c
index 255ed32ca783482bfde254b1a51529d7f4614a24..16a2db13e40a68bc30713e105d394124729b0c31 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "avcodec.h"
 #include "get_bits.h"
+#include "internal.h"
 
 typedef struct YopDecContext {
     AVFrame frame;
@@ -191,7 +192,7 @@ static void yop_next_macroblock(YopDecContext *s)
     s->dstptr += 2;
 }
 
-static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     YopDecContext *s = avctx->priv_data;
@@ -207,7 +208,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         return AVERROR_INVALIDDATA;
     }
 
-    ret = avctx->get_buffer(avctx, &s->frame);
+    ret = ff_get_buffer(avctx, &s->frame);
     if (ret < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
@@ -258,7 +259,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         yop_next_macroblock(s);
     }
 
-    *data_size        = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *) data = s->frame;
     return avpkt->size;
 }