]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/avuidec.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / avuidec.c
index 52d809010924791cb6af0c8afd492710743f8c1f..22af7190903fa23d229e582ead70ae0b82418ac6 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 #include "libavutil/intreadwrite.h"
 
 static av_cold int avui_decode_init(AVCodecContext *avctx)
@@ -38,7 +39,7 @@ static av_cold int avui_decode_init(AVCodecContext *avctx)
 }
 
 static int avui_decode_frame(AVCodecContext *avctx, void *data,
-                             int *data_size, AVPacket *avpkt)
+                             int *got_frame, AVPacket *avpkt)
 {
     AVFrame *pic = avctx->coded_frame;
     const uint8_t *src = avpkt->data, *extradata = avctx->extradata;
@@ -79,7 +80,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
 
     pic->reference = 0;
 
-    if (avctx->get_buffer(avctx, pic) < 0) {
+    if (ff_get_buffer(avctx, pic) < 0) {
         av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
         return AVERROR(ENOMEM);
     }
@@ -127,7 +128,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
         src  += 4;
         srca += 4;
     }
-    *data_size = sizeof(AVFrame);
+    *got_frame       = 1;
     *(AVFrame *)data = *pic;
 
     return avpkt->size;