]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qdrw.c
Add MPL2 subtitles demuxer and decoder.
[ffmpeg] / libavcodec / qdrw.c
index ab4c6c154c41dd43bf8fa94ef3aac6c4a465bd6b..2be6e04b645750086eb7588709c8d04cca2ac41a 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/common.h"
 #include "libavutil/intreadwrite.h"
 #include "avcodec.h"
+#include "internal.h"
 
 typedef struct QdrawContext{
     AVCodecContext *avctx;
@@ -34,7 +35,7 @@ typedef struct QdrawContext{
 } QdrawContext;
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -52,7 +53,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;
     }
@@ -139,7 +140,7 @@ static int decode_frame(AVCodecContext *avctx,
         outdata += a->pic.linesize[0];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = a->pic;
 
     return buf_size;