]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/sgidec.c
huffyuv: make use of av_fast_padded_malloc()
[ffmpeg] / libavcodec / sgidec.c
index bf6e5723f699f3ad5a29cfdc5028b078ccde00fb..555b5044afb1213f335c7e7914955d986aaee5ea 100644 (file)
@@ -23,6 +23,7 @@
 #include "libavutil/avassert.h"
 #include "avcodec.h"
 #include "bytestream.h"
+#include "internal.h"
 #include "sgi.h"
 
 typedef struct SgiState {
@@ -151,7 +152,7 @@ static int read_uncompressed_sgi(unsigned char* out_buf, SgiState *s)
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     SgiState *s = avctx->priv_data;
@@ -210,7 +211,7 @@ static int decode_frame(AVCodecContext *avctx,
         avctx->release_buffer(avctx, p);
 
     p->reference = 0;
-    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;
     }
@@ -233,7 +234,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (ret == 0) {
         *picture   = s->picture;
-        *data_size = sizeof(AVPicture);
+        *got_frame = 1;
         return avpkt->size;
     } else {
         return ret;