]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/4xm.c
lavfi/swapuv: use FFSWAP
[ffmpeg] / libavcodec / 4xm.c
index 85795f96ee1cd4532ff7249939bca54f70885c74..de5c9f53ee88b215beb867a6c8973e6642d4d5ac 100644 (file)
@@ -29,6 +29,7 @@
 #include "bytestream.h"
 #include "dsputil.h"
 #include "get_bits.h"
+#include "internal.h"
 
 #include "libavutil/avassert.h"
 
@@ -783,7 +784,7 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length)
 }
 
 static int decode_frame(AVCodecContext *avctx, void *data,
-                        int *data_size, AVPacket *avpkt)
+                        int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf    = avpkt->data;
     int buf_size          = avpkt->size;
@@ -841,7 +842,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
                                      cfrm->size + data_size + FF_INPUT_BUFFER_PADDING_SIZE);
         // explicit check needed as memcpy below might not catch a NULL
         if (!cfrm->data) {
-            av_log(f->avctx, AV_LOG_ERROR, "realloc falure\n");
+            av_log(f->avctx, AV_LOG_ERROR, "realloc failure\n");
             return -1;
         }
 
@@ -896,7 +897,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
     } else if (frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
         if (!f->last_picture.data[0]) {
             f->last_picture.reference = 3;
-            if (avctx->get_buffer(avctx, &f->last_picture) < 0) {
+            if (ff_get_buffer(avctx, &f->last_picture) < 0) {
                 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
                 return -1;
             }
@@ -918,7 +919,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
     p->key_frame = p->pict_type == AV_PICTURE_TYPE_I;
 
     *picture   = *p;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     emms_c();