]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bfi.c
Silicon Graphics Movie (.mv) demuxer
[ffmpeg] / libavcodec / bfi.c
index f7df68e527c7aad4dcab4bae26b771acc7b1f352..70291b563b97225aad5dc8722b19c8731a421ce6 100644 (file)
@@ -29,6 +29,7 @@
 #include "libavutil/common.h"
 #include "avcodec.h"
 #include "bytestream.h"
+#include "internal.h"
 
 typedef struct BFIContext {
     AVCodecContext *avctx;
@@ -47,7 +48,7 @@ static av_cold int bfi_decode_init(AVCodecContext *avctx)
 }
 
 static int bfi_decode_frame(AVCodecContext *avctx, void *data,
-                            int *data_size, AVPacket *avpkt)
+                            int *got_frame, AVPacket *avpkt)
 {
     GetByteContext g;
     int buf_size    = avpkt->size;
@@ -63,7 +64,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, void *data,
 
     bfi->frame.reference = 3;
 
-    if (avctx->get_buffer(avctx, &bfi->frame) < 0) {
+    if (ff_get_buffer(avctx, &bfi->frame) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return -1;
     }
@@ -168,7 +169,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, void *data,
         src += avctx->width;
         dst += bfi->frame.linesize[0];
     }
-    *data_size       = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = bfi->frame;
     return buf_size;
 }