]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v308dec.c
alsdec: channel sorting
[ffmpeg] / libavcodec / v308dec.c
index fd742cab854b8e86bc9ff320cddf4f4906312e61..b5567f85742c4938d7284e6f26c32a5a4b38d123 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 
 static av_cold int v308_decode_init(AVCodecContext *avctx)
 {
@@ -39,7 +40,7 @@ static av_cold int v308_decode_init(AVCodecContext *avctx)
 }
 
 static int v308_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;
@@ -56,7 +57,7 @@ static int v308_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);
     }
@@ -80,7 +81,7 @@ static int v308_decode_frame(AVCodecContext *avctx, void *data,
         v += pic->linesize[2];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = *pic;
 
     return avpkt->size;