]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp56.c
libavcodec/x86/mpegvideo: switch to av_assert2
[ffmpeg] / libavcodec / vp56.c
index ae7a1172e16de935bdc51c94e465cdcdd605d3da..adde128a6249e5c401de899c05f26c5aaa696319 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "avcodec.h"
 #include "bytestream.h"
+#include "internal.h"
 
 #include "vp56.h"
 #include "vp56data.h"
@@ -491,7 +492,7 @@ static int vp56_size_changed(VP56Context *s)
 
 static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *, int, int);
 
-int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                          AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -534,7 +535,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     p->reference = 3;
-    if (avctx->get_buffer(avctx, p) < 0) {
+    if (ff_get_buffer(avctx, p) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return -1;
     }
@@ -585,7 +586,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     p->qscale_table = s->qscale_table;
     p->qscale_type = FF_QSCALE_TYPE_VP56;
     *(AVFrame*)data = *p;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return avpkt->size;
 }