]> git.sesse.net Git - ffmpeg/commitdiff
lavc: fix decode_frame() third parameter semantics for video decoders
authorAnton Khirnov <anton@khirnov.net>
Tue, 13 Nov 2012 18:35:22 +0000 (19:35 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 4 Dec 2012 20:45:36 +0000 (21:45 +0100)
It's got_frame, not data size

133 files changed:
libavcodec/4xm.c
libavcodec/8bps.c
libavcodec/aasc.c
libavcodec/anm.c
libavcodec/ansi.c
libavcodec/asvdec.c
libavcodec/aura.c
libavcodec/avs.c
libavcodec/bethsoftvideo.c
libavcodec/bfi.c
libavcodec/bink.c
libavcodec/bmp.c
libavcodec/bmv.c
libavcodec/c93.c
libavcodec/cavsdec.c
libavcodec/cdgraphics.c
libavcodec/cdxl.c
libavcodec/cinepak.c
libavcodec/cljr.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dfa.c
libavcodec/dnxhddec.c
libavcodec/dpx.c
libavcodec/dsicinav.c
libavcodec/dvdec.c
libavcodec/dxa.c
libavcodec/dxtory.c
libavcodec/eacmv.c
libavcodec/eamad.c
libavcodec/eatgq.c
libavcodec/eatgv.c
libavcodec/eatqi.c
libavcodec/escape124.c
libavcodec/ffv1dec.c
libavcodec/flashsv.c
libavcodec/flicvideo.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/h263.h
libavcodec/h263dec.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/idcinvideo.c
libavcodec/iff.c
libavcodec/indeo2.c
libavcodec/indeo3.c
libavcodec/interplayvideo.c
libavcodec/ivi_common.c
libavcodec/ivi_common.h
libavcodec/jvdec.c
libavcodec/kgv1dec.c
libavcodec/kmvc.c
libavcodec/lagarith.c
libavcodec/lcldec.c
libavcodec/libopenjpegdec.c
libavcodec/libschroedingerdec.c
libavcodec/libvpxdec.c
libavcodec/loco.c
libavcodec/mdec.c
libavcodec/mimic.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mjpegdec.h
libavcodec/mmvideo.c
libavcodec/motionpixels.c
libavcodec/msrle.c
libavcodec/mss1.c
libavcodec/mss2.c
libavcodec/mss3.c
libavcodec/mss4.c
libavcodec/msvideo1.c
libavcodec/mxpegdec.c
libavcodec/nuv.c
libavcodec/pcx.c
libavcodec/pictordec.c
libavcodec/pngdec.c
libavcodec/pnmdec.c
libavcodec/proresdec.c
libavcodec/ptx.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrle.c
libavcodec/r210dec.c
libavcodec/rawdec.c
libavcodec/rl2.c
libavcodec/roqvideodec.c
libavcodec/rpza.c
libavcodec/rv10.c
libavcodec/rv34.h
libavcodec/sgidec.c
libavcodec/smacker.c
libavcodec/smc.c
libavcodec/snowdec.c
libavcodec/sp5xdec.c
libavcodec/sunrast.c
libavcodec/svq1dec.c
libavcodec/svq3.c
libavcodec/targa.c
libavcodec/tiertexseqv.c
libavcodec/tiff.c
libavcodec/tmv.c
libavcodec/truemotion1.c
libavcodec/truemotion2.c
libavcodec/tscc.c
libavcodec/tscc2.c
libavcodec/txd.c
libavcodec/ulti.c
libavcodec/utvideodec.c
libavcodec/v210dec.c
libavcodec/v210x.c
libavcodec/v410dec.c
libavcodec/vb.c
libavcodec/vble.c
libavcodec/vc1dec.c
libavcodec/vcr1.c
libavcodec/vmdav.c
libavcodec/vmnc.c
libavcodec/vp3.c
libavcodec/vp56.c
libavcodec/vp56.h
libavcodec/vp8.c
libavcodec/vqavideo.c
libavcodec/wnv1.c
libavcodec/xan.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/xxan.c
libavcodec/yop.c
libavcodec/zerocodec.c
libavcodec/zmbv.c

index e3f49b37c48d795ac5e24b4503bf39107cd9378c..f78a0a21b26314b6bd7f0fe1bbc66941c22d170c 100644 (file)
@@ -753,7 +753,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;
@@ -870,7 +870,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();
 
index ea428da628bc2ece3f3c9cde1455d540a1f11921..306fd52bf40fb64c47897ca7e3c7e28edd60492c 100644 (file)
@@ -64,7 +64,7 @@ typedef struct EightBpsContext {
  *
  */
 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;
@@ -149,7 +149,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
         memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index 60bf7c626ddbc4cdc174b8b76f04f191cb4cdc09..cd1df36ae2055e2d3264dca61a9717e0d2054687 100644 (file)
@@ -50,7 +50,7 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx)
 }
 
 static int aasc_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -85,7 +85,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
         return -1;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index de563dda2b4643afdead0dcfad3b4b996991b241..fc328bb06b11f769601c2132a512a1e3134c6188 100644 (file)
@@ -105,7 +105,7 @@ exhausted:
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     AnmContext *s = avctx->priv_data;
@@ -170,7 +170,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
     return buf_size;
 }
index bee14b86f1259a45e6d0c90069ebd91b979d0b26..edd373db45a2028eea119ac76836f41ea15a38c3 100644 (file)
@@ -311,7 +311,7 @@ static int execute_code(AVCodecContext * avctx, int c)
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     AnsiContext *s = avctx->priv_data;
@@ -411,7 +411,7 @@ static int decode_frame(AVCodecContext *avctx,
         buf++;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
     return buf_size;
 }
index 9f6b93d4db9c023d6c42a0f80c98062034052aac..a53ba77fc5841afdf3a0c7abb8070a5a79c719da 100644 (file)
@@ -181,7 +181,7 @@ static inline void idct_put(ASV1Context *a, int mb_x, int mb_y){
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -247,7 +247,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     *picture   = a->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     emms_c();
 
index 9ca2ef8d02fdeba3c01cc96a4d365e35d129846d..d0fe9466a3c0dba6aa7bd29ae091dacd2032d3e9 100644 (file)
@@ -46,7 +46,7 @@ static av_cold int aura_decode_init(AVCodecContext *avctx)
 }
 
 static int aura_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *pkt)
 {
     AuraDecodeContext *s=avctx->priv_data;
@@ -108,7 +108,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
         V += s->frame.linesize[2] - (avctx->width >> 1);
     }
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data= s->frame;
 
     return pkt->size;
index f6535a26a665831b6150a5a0e3dd6f5adfa64cb5..98a53f20bc632e0a362f547fbb070552337d2197 100644 (file)
@@ -44,7 +44,7 @@ typedef enum {
 
 static int
 avs_decode_frame(AVCodecContext * avctx,
-                 void *data, int *data_size, AVPacket *avpkt)
+                 void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     const uint8_t *buf_end = avpkt->data + avpkt->size;
@@ -150,7 +150,7 @@ avs_decode_frame(AVCodecContext * avctx,
     }
 
     *picture   = avs->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index c1f95ed889d5fc1326236e0dbc08cf4b3aa26aea..316adb6c790c4ae9912fa042adfe6cc1d70b8e18 100644 (file)
@@ -63,7 +63,7 @@ static int set_palette(BethsoftvidContext *ctx)
 }
 
 static int bethsoftvid_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     BethsoftvidContext * vid = avctx->priv_data;
@@ -95,7 +95,7 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx,
 
     switch(block_type = bytestream2_get_byte(&vid->g)){
         case PALETTE_BLOCK: {
-            *data_size = 0;
+            *got_frame = 0;
             if ((ret = set_palette(vid)) < 0) {
                 av_log(avctx, AV_LOG_ERROR, "error reading palette\n");
                 return ret;
@@ -136,7 +136,7 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx,
     }
     end:
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = vid->frame;
 
     return avpkt->size;
index 03d06fa489a573e53a7824bb02d2f4f8adf12cad..50b20bacf9444b92d8d9ae5cd4172edbea8bf5de 100644 (file)
@@ -46,7 +46,7 @@ static av_cold int bfi_decode_init(AVCodecContext *avctx)
 }
 
 static int bfi_decode_frame(AVCodecContext *avctx, void *data,
-                            int *data_size, AVPacket *avpkt)
+                            int *got_frame, AVPacket *avpkt)
 {
     GetByteContext g;
     int buf_size    = avpkt->size;
@@ -164,7 +164,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, void *data,
         src += avctx->width;
         dst += bfi->frame.linesize[0];
     }
-    *data_size       = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = bfi->frame;
     return buf_size;
 }
index 733b5bdbd799ae1be2d0795895aace88081988de..059601debf529d8f052cf2395955bcf489a6fdfb 100644 (file)
@@ -1161,7 +1161,7 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
 {
     BinkContext * const c = avctx->priv_data;
     GetBitContext gb;
@@ -1208,7 +1208,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     }
     emms_c();
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     if (c->version > 'b')
index ae168556d93144a1e0eb30a05fcb90f7fed7c02b..648d0ac31b8e62a44ac65c69293838444666adf4 100644 (file)
@@ -35,7 +35,7 @@ static av_cold int bmp_decode_init(AVCodecContext *avctx){
 }
 
 static int bmp_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -347,7 +347,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
     }
 
     *picture = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index 762a7fb2617b2e8dd4aaf1ae95e2c5fd120aaf26..a7f21eceb2bf4e3d19697ce71ad31e8779318d8d 100644 (file)
@@ -194,7 +194,8 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *pkt)
 {
     BMVDecContext * const c = avctx->priv_data;
     int type, scr_off;
@@ -265,7 +266,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         outptr += c->pic.linesize[0];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index 07acb26a7213cc9c8eec8b5d90ee38e59f7a424a..e8071ac69bf24c0ea257605a4f1bdd9c0f57470b 100644 (file)
@@ -113,7 +113,7 @@ static inline void draw_n_color(uint8_t *out, int stride, int width,
 }
 
 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;
@@ -239,7 +239,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
     }
 
     *picture = *newpic;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return buf_size;
 }
index 5619071a1039dda0733f7aa82bf0755e0255198a..af0309c41b9ee7e840e50d2b860a970c5ef7d3d7 100644 (file)
@@ -1096,7 +1096,7 @@ static void cavs_flush(AVCodecContext * avctx) {
     h->got_keyframe = 0;
 }
 
-static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
+static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                              AVPacket *avpkt) {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -1112,7 +1112,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
 
     if (buf_size == 0) {
         if (!s->low_delay && h->DPB[0].f.data[0]) {
-            *data_size = sizeof(AVPicture);
+            *got_frame = 1;
             *picture = h->DPB[0].f;
             memset(&h->DPB[0], 0, sizeof(h->DPB[0]));
         }
@@ -1140,19 +1140,19 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
                 h->got_keyframe = 1;
             }
         case PIC_PB_START_CODE:
-            *data_size = 0;
+            *got_frame = 0;
             if(!h->got_keyframe)
                 break;
             init_get_bits(&s->gb, buf_ptr, input_size);
             h->stc = stc;
             if(decode_pic(h))
                 break;
-            *data_size = sizeof(AVPicture);
+            *got_frame = 1;
             if(h->pic_type != AV_PICTURE_TYPE_B) {
                 if(h->DPB[1].f.data[0]) {
                     *picture = h->DPB[1].f;
                 } else {
-                    *data_size = 0;
+                    *got_frame = 0;
                 }
             } else
                 *picture = h->picture.f;
index 9c9583d06af53d2e5e80244c4ede164229517c22..e4ed83b9d40f086d0991ccea28b1f81bcd434246 100644 (file)
@@ -267,7 +267,7 @@ static void cdg_scroll(CDGraphicsContext *cc, uint8_t *data,
 }
 
 static int cdg_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size, AVPacket *avpkt)
+                            void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size       = avpkt->size;
@@ -348,9 +348,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
             break;
         }
 
-        *data_size = sizeof(AVFrame);
+        *got_frame = 1;
     } else {
-        *data_size = 0;
+        *got_frame = 0;
         buf_size   = 0;
     }
 
index b51a2cb00f7126009cd96c89f3921beca6d6dd92..0b3d59cb80cabb321341a67166b6b09698cd39bc 100644 (file)
@@ -208,7 +208,7 @@ static void cdxl_decode_ham8(CDXLVideoContext *c)
 }
 
 static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
-                             int *data_size, AVPacket *pkt)
+                             int *got_frame, AVPacket *pkt)
 {
     CDXLVideoContext *c = avctx->priv_data;
     AVFrame * const p = &c->frame;
@@ -281,7 +281,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
     } else {
         cdxl_decode_rgb(c);
     }
-    *data_size      = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->frame;
 
     return buf_size;
index e6e2df2a2705f65fb8ec3e114f430e332ca1ba69..c6f4ffa25cb6ddd873999d825974975171b23340 100644 (file)
@@ -419,7 +419,7 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx)
 }
 
 static int cinepak_decode_frame(AVCodecContext *avctx,
-                                void *data, int *data_size,
+                                void *data, int *got_frame,
                                 AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -450,7 +450,7 @@ static int cinepak_decode_frame(AVCodecContext *avctx,
     if (s->palette_video)
         memcpy (s->frame.data[1], s->pal, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index c4b12b1d1f40d74f541c9115153030cd54794268..9ba513845b552c36801c5734289d6c7e5b677cca 100644 (file)
@@ -44,7 +44,7 @@ static av_cold int common_init(AVCodecContext *avctx)
 
 #if CONFIG_CLJR_DECODER
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -95,7 +95,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     *picture   = a->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index 188df1b4b76e40057de1d1655966c925aa821ef4..2c1b2e78585db4b9db08022f157df3d1d3685eed 100644 (file)
@@ -137,7 +137,7 @@ static void add_frame_32(AVFrame *f, const uint8_t *src,
 }
 #endif
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt) {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -215,7 +215,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     *picture = c->pic;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     return buf_size;
 }
 
index a11fee26722bbbbbae6a1e0a39897bd99aaeed11..49cf64c08d1db4f3253b68b1366049dece73db6f 100644 (file)
@@ -60,7 +60,7 @@ static av_cold int cyuv_decode_init(AVCodecContext *avctx)
 }
 
 static int cyuv_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -163,7 +163,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
         }
     }
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data= s->frame;
 
     return buf_size;
index 4f148336f470527fd68089ca652c752fcd474e55..119be7066ce0bcf28158d020916bb65b1652845e 100644 (file)
@@ -308,7 +308,7 @@ static const char* chunk_name[8] = {
 };
 
 static int dfa_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     DfaContext *s = avctx->priv_data;
@@ -363,7 +363,7 @@ static int dfa_decode_frame(AVCodecContext *avctx,
     }
     memcpy(s->pic.data[1], s->pal, sizeof(s->pal));
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->pic;
 
     return avpkt->size;
index e988d68036a81308dc5d8b7892f211e46ebfda62..7cc17c4db3f297cf814d27d3bdb6e33666f980b8 100644 (file)
@@ -329,7 +329,7 @@ static int dnxhd_decode_macroblocks(DNXHDContext *ctx, const uint8_t *buf, int b
     return 0;
 }
 
-static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -374,7 +374,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     *picture = ctx->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
     return buf_size;
 }
 
index 2b1c7f8b647e284cfbcd3443d54ee6ef7a22ec2c..7c01babb7443c8b68c0b73bcfd81dafd96b0860c 100644 (file)
@@ -52,7 +52,7 @@ static inline unsigned make_16bit(unsigned value)
 
 static int decode_frame(AVCodecContext *avctx,
                         void *data,
-                        int *data_size,
+                        int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -213,7 +213,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     *picture   = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index 87979525de829a54eba651fae83b069418243d42..39b6a4cabb391b8a45e4964dd18e0ce422a5d13f 100644 (file)
@@ -201,7 +201,7 @@ static void cin_decode_rle(const unsigned char *src, int src_size, unsigned char
 }
 
 static int cinvideo_decode_frame(AVCodecContext *avctx,
-                                 void *data, int *data_size,
+                                 void *data, int *got_frame,
                                  AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -297,7 +297,7 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
 
     FFSWAP(uint8_t *, cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_table[CIN_PRE_BMP]);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = cin->frame;
 
     return buf_size;
index b4cb23f60489bfb69b3d2576e05ad29a992d0d74..bc1bb55eb9ee07e171cafe84c5f3bdfaadb1fe2a 100644 (file)
@@ -311,7 +311,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
 /* NOTE: exactly one frame must be given (120000 bytes for NTSC,
    144000 bytes for PAL - or twice those for 50Mbps) */
 static int dvvideo_decode_frame(AVCodecContext *avctx,
-                                 void *data, int *data_size,
+                                 void *data, int *got_frame,
                                  AVPacket *avpkt)
 {
     uint8_t *buf = avpkt->data;
@@ -349,7 +349,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
     emms_c();
 
     /* return image */
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->picture;
 
     /* Determine the codec's sample_aspect ratio from the packet */
index e634bbecfc0be8205495e096ee53308e6bfa37a2..0f590f1ed9ca0e99591e56ded8dd2d5e3c0a2009 100644 (file)
@@ -189,7 +189,7 @@ static int decode_13(AVCodecContext *avctx, DxaDecContext *c, uint8_t* dst, uint
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -282,7 +282,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     if(c->pic.data[0])
         avctx->release_buffer(avctx, &c->pic);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->prev;
 
     /* always report that the buffer was completely consumed */
index 4ee364bab172ab82cff399431fa368d12d244bf3..30983f8056d3cb5611bc844551d1e25069785268 100644 (file)
@@ -35,7 +35,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     int h, w;
@@ -83,7 +83,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         V  += pic->linesize[2];
     }
 
-    *data_size      = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = *pic;
 
     return avpkt->size;
index d3233bb96d058a078afc14d907b6ca80cff3b5ae..0dce066f1eee0187117d36db732cd7d1ad24a65b 100644 (file)
@@ -147,7 +147,7 @@ static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t
 #define MVIh_TAG MKTAG('M', 'V', 'I', 'h')
 
 static int cmv_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -192,7 +192,7 @@ static int cmv_decode_frame(AVCodecContext *avctx,
         cmv_decode_intra(s, buf+2, buf_end);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     return buf_size;
index ec74051b2fab15417e9166b7d108b8d80125d5ec..9f4d85878ad7498585ede7d69c22182fc21d280c 100644 (file)
@@ -219,7 +219,7 @@ static void calc_quant_matrix(MadContext *s, int qscale)
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -232,7 +232,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     if (buf_size < 17) {
         av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
-        *data_size = 0;
+        *got_frame = 0;
         return -1;
     }
 
@@ -274,7 +274,7 @@ static int decode_frame(AVCodecContext *avctx,
         for (s->mb_x=0; s->mb_x < (avctx->width +15)/16; s->mb_x++)
             decode_mb(s, inter);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     if (chunk_type != MADe_TAG)
index 9e3a3e652915e798f73758aadd43e4e0a5038bcc..d6a6e55ff1d88e2c0ae83d880ebedaa161e3cd8f 100644 (file)
@@ -184,7 +184,7 @@ static void tgq_calculate_qtable(TgqContext *s, int quant){
 }
 
 static int tgq_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt){
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -227,7 +227,7 @@ static int tgq_decode_frame(AVCodecContext *avctx,
         for (x = 0; x < FFALIGN(avctx->width, 16) >> 4; x++)
             tgq_decode_mb(s, y, x);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     return avpkt->size;
index 170eeb10d54cae8b4d01039df070159b71bdcb0a..46644abeadea87f9aedd13ab26558e66f1f4c218 100644 (file)
@@ -249,7 +249,7 @@ static void cond_release_buffer(AVFrame *pic)
 }
 
 static int tgv_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -325,7 +325,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
         }
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     return buf_size;
index 51232d0ba2b4a6999c13538a2cd41e16009d31ab..f9141e2017b72b09488401abdd7c0e7db92fecfe 100644 (file)
@@ -97,7 +97,7 @@ static void tqi_calculate_qtable(MpegEncContext *s, int quant)
 }
 
 static int tqi_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -138,7 +138,7 @@ static int tqi_decode_frame(AVCodecContext *avctx,
         tqi_idct_put(t, t->block);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = t->frame;
     return buf_size;
 }
index dce4d0493e4c7a25a7ef8e879d69fedcb68d6de4..a27ab6890dc88a74e131fbd9a1de733d9278888b 100644 (file)
@@ -197,7 +197,7 @@ static const uint16_t mask_matrix[] = {0x1,   0x2,   0x10,   0x20,
                                        0x400, 0x800, 0x4000, 0x8000};
 
 static int escape124_decode_frame(AVCodecContext *avctx,
-                                  void *data, int *data_size,
+                                  void *data, int *got_frame,
                                   AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -232,7 +232,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
     if (!(frame_flags & 0x114) || !(frame_flags & 0x7800000)) {
         av_log(NULL, AV_LOG_DEBUG, "Skipping frame\n");
 
-        *data_size = sizeof(AVFrame);
+        *got_frame = 1;
         *(AVFrame*)data = s->frame;
 
         return frame_size;
@@ -358,7 +358,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
         avctx->release_buffer(avctx, &s->frame);
 
     *(AVFrame*)data = s->frame = new_frame;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return frame_size;
 }
index 5b1c80cf240af88db83d83d8365b82bd89aeb674..b1dec7de3f93b55ef66ed4dea7b04940ac7e297c 100644 (file)
@@ -794,7 +794,7 @@ static av_cold int ffv1_decode_init(AVCodecContext *avctx)
 }
 
 static int ffv1_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;
@@ -901,7 +901,7 @@ static int ffv1_decode_frame(AVCodecContext *avctx, void *data,
     f->picture_number++;
 
     *picture   = *p;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     FFSWAP(AVFrame, f->picture, f->last_picture);
 
index d12e2342c198f0a97aa9938782ff04db46d6e25f..3c5a35c0dd35347e84b5d460edd4135f574c6473 100644 (file)
@@ -234,7 +234,7 @@ static int calc_deflate_block_size(int tmpblock_size)
 }
 
 static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
-                                int *data_size, AVPacket *avpkt)
+                                int *got_frame, AVPacket *avpkt)
 {
     int buf_size       = avpkt->size;
     FlashSVContext *s  = avctx->priv_data;
@@ -441,7 +441,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
         memcpy(s->keyframe, s->frame.data[0], s->frame.linesize[0] * avctx->height);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     if ((get_bits_count(&gb) / 8) != buf_size)
index 2b9b290ba762c98411bb8f26a204bf9eb7fc7ebd..02bfc75da426de6a5062702fc1b0b055b707510b 100644 (file)
@@ -129,7 +129,7 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
 }
 
 static int flic_decode_frame_8BPP(AVCodecContext *avctx,
-                                  void *data, int *data_size,
+                                  void *data, int *got_frame,
                                   const uint8_t *buf, int buf_size)
 {
     FlicDecodeContext *s = avctx->priv_data;
@@ -419,14 +419,14 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
         s->new_palette = 0;
     }
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     return buf_size;
 }
 
 static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
-                                      void *data, int *data_size,
+                                      void *data, int *got_frame,
                                       const uint8_t *buf, int buf_size)
 {
     /* Note, the only difference between the 15Bpp and 16Bpp */
@@ -681,14 +681,14 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
                "and final chunk ptr = %d\n", buf_size, bytestream2_tell(&g2));
 
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     return buf_size;
 }
 
 static int flic_decode_frame_24BPP(AVCodecContext *avctx,
-                                   void *data, int *data_size,
+                                   void *data, int *got_frame,
                                    const uint8_t *buf, int buf_size)
 {
   av_log(avctx, AV_LOG_ERROR, "24Bpp FLC Unsupported due to lack of test files.\n");
@@ -696,22 +696,22 @@ static int flic_decode_frame_24BPP(AVCodecContext *avctx,
 }
 
 static int flic_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
-      return flic_decode_frame_8BPP(avctx, data, data_size,
+      return flic_decode_frame_8BPP(avctx, data, got_frame,
                                     buf, buf_size);
     }
     else if ((avctx->pix_fmt == AV_PIX_FMT_RGB555) ||
              (avctx->pix_fmt == AV_PIX_FMT_RGB565)) {
-      return flic_decode_frame_15_16BPP(avctx, data, data_size,
+      return flic_decode_frame_15_16BPP(avctx, data, got_frame,
                                         buf, buf_size);
     }
     else if (avctx->pix_fmt == AV_PIX_FMT_BGR24) {
-      return flic_decode_frame_24BPP(avctx, data, data_size,
+      return flic_decode_frame_24BPP(avctx, data, got_frame,
                                      buf, buf_size);
     }
 
index 3df12809b0271d10ac75d31fd719ef9cb8cdde93..ba2f32af2a12ab7886503d9321bb25cedc1a811c 100644 (file)
@@ -124,7 +124,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -343,7 +343,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     *frame = *f;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return buf_size;
 }
index f4d1cc1967609695c2f9594a01d8518699b23178..3f8f6baf6aa6d3fa1cf9c99218e530062d0b9131 100644 (file)
@@ -39,7 +39,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     int field, ret;
@@ -97,7 +97,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         buf += field_size - min_field_size;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = *pic;
 
     return avpkt->size;
index d5f1c42255e13067fb14815f09d840ec9fa63551..8f1d6941bcba382128b58f8867dc80ed472ee9c8 100644 (file)
@@ -282,7 +282,8 @@ static av_cold int gif_decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                            AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -312,7 +313,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, A
         return ret;
 
     *picture = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
     return s->bytestream - buf;
 }
 
index 778088870a78727058357543672f6707310216ac..55453c112dea395397a633a57c451436f49362ab 100644 (file)
@@ -543,7 +543,7 @@ static int get_consumed_bytes(MpegEncContext *s, int buf_size){
 }
 
 static int h261_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -628,7 +628,7 @@ assert(s->current_picture.f.pict_type == s->pict_type);
     *pict = s->current_picture_ptr->f;
     ff_print_debug_info(s, pict);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return get_consumed_bytes(s, buf_size);
 }
index 2a1ae4839d4314b37057420bcd850b7a0ed8fab2..beb32c4f18037eb3f7ae3744dc0917f366eda07f 100644 (file)
@@ -69,7 +69,7 @@ int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code);
 av_const int ff_h263_aspect_to_info(AVRational aspect);
 int ff_h263_decode_init(AVCodecContext *avctx);
 int ff_h263_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt);
 int ff_h263_decode_end(AVCodecContext *avctx);
 void ff_h263_encode_mb(MpegEncContext *s,
index 72bf05243cbc7b6da3e4d79182e8da4425eb6e93..6281ed283274f3f030ca0741225f73e233649ec6 100644 (file)
@@ -340,7 +340,7 @@ static int decode_slice(MpegEncContext *s){
 }
 
 int ff_h263_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -362,7 +362,7 @@ uint64_t time= rdtsc();
             *pict = s->next_picture_ptr->f;
             s->next_picture_ptr= NULL;
 
-            *data_size = sizeof(AVFrame);
+            *got_frame = 1;
         }
 
         return 0;
@@ -729,7 +729,7 @@ intrax8_decoded:
     }
 
     if(s->last_picture_ptr || s->low_delay){
-        *data_size = sizeof(AVFrame);
+        *got_frame = 1;
         ff_print_debug_info(s, pict);
     }
 
index 7bdd6f1ed2211a70836d0f27f1664be4a1070fc2..f04d8787b05953fa8479c8e19410e5b1792bf6de 100644 (file)
@@ -3988,7 +3988,7 @@ static int get_consumed_bytes(MpegEncContext *s, int pos, int buf_size)
 }
 
 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;
@@ -4025,7 +4025,7 @@ out:
             h->delayed_pic[i] = h->delayed_pic[i + 1];
 
         if (out) {
-            *data_size = sizeof(AVFrame);
+            *got_frame = 1;
             *pict      = out->f;
         }
 
@@ -4057,14 +4057,14 @@ out:
 
         if (!h->next_output_pic) {
             /* Wait for second field. */
-            *data_size = 0;
+            *got_frame = 0;
         } else {
-            *data_size = sizeof(AVFrame);
+            *got_frame = 1;
             *pict      = h->next_output_pic->f;
         }
     }
 
-    assert(pict->data[0] || !*data_size);
+    assert(pict->data[0] || !*got_frame);
     ff_print_debug_info(s, pict);
 
     return get_consumed_bytes(s, buf_index, buf_size);
index 3da1de8fc57588900fe73ae8210e6d458dbc9812..511b32669899c5224bde5776c6bec432a006a8d2 100644 (file)
@@ -928,7 +928,7 @@ static void draw_slice(HYuvContext *s, int y)
     s->last_slice_end = y + h;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -1181,7 +1181,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     emms_c();
 
     *picture = *p;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return (get_bits_count(&s->gb) + 31) / 32 * 4 + table_size;
 }
index 8ce045dc0f814d8150480afbc8be96a1f5e23828..273eca60ddf85bd8096c42bc9e4a223444c39914 100644 (file)
@@ -210,7 +210,7 @@ static void idcin_decode_vlcs(IdcinContext *s)
 }
 
 static int idcin_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -238,7 +238,7 @@ static int idcin_decode_frame(AVCodecContext *avctx,
     /* make the palette available on the way out */
     memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index 4bbb5dda1f698300afab39aeaf191f290d15612a..99da7b5d614f9ba9fc8f1edbd183dfb8e30d9cd7 100644 (file)
@@ -247,7 +247,7 @@ static int decode_byterun(uint8_t *dst, int dst_size,
 }
 
 static int decode_frame_ilbm(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     IffContext *s = avctx->priv_data;
@@ -298,13 +298,13 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
         }
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
     return buf_size;
 }
 
 static int decode_frame_byterun1(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     IffContext *s = avctx->priv_data;
@@ -354,7 +354,7 @@ static int decode_frame_byterun1(AVCodecContext *avctx,
         }
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
     return buf_size;
 }
index 76592d67c39f162d58b6bfc1bf169015a2242481..1dd151dfbeeff249e4914d546b6aa3eb7df224c7 100644 (file)
@@ -138,7 +138,7 @@ static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_
 }
 
 static int ir2_decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -194,7 +194,7 @@ static int ir2_decode_frame(AVCodecContext *avctx,
     }
 
     *picture   = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index fe2ee935bb808105363a635415363ff4e397ef3c..261c651b5223030e00af17010076623031c4a33f 100644 (file)
@@ -1025,7 +1025,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
 }
 
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     Indeo3DecodeContext *ctx = avctx->priv_data;
@@ -1040,7 +1040,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     /* skip sync(null) frames */
     if (res) {
         // we have processed 16 bytes but no data was decoded
-        *data_size = 0;
+        *got_frame = 0;
         return buf_size;
     }
 
@@ -1086,7 +1086,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
                  ctx->frame.data[2], ctx->frame.linesize[2],
                  (avctx->height + 3) >> 2);
 
-    *data_size      = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = ctx->frame;
 
     return buf_size;
index 49db10df2aeee64e1b6b669c1923700dd24ea644..3f098ac31df6c4a494e0e88a3c852e4bf304ce64 100644 (file)
@@ -953,7 +953,7 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
 }
 
 static int ipvideo_decode_frame(AVCodecContext *avctx,
-                                void *data, int *data_size,
+                                void *data, int *got_frame,
                                 AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -988,7 +988,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
 
     ipvideo_decode_opcodes(s);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->current_frame;
 
     /* shuffle frames */
index 58a00ce70e73e019194ae80235b3fc63acf684e5..cc5224cf39001fe61afa4da17b9785506e242135 100644 (file)
@@ -743,7 +743,7 @@ static int decode_band(IVI45DecContext *ctx,
     return result;
 }
 
-int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     IVI45DecContext *ctx = avctx->priv_data;
@@ -820,7 +820,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     ff_ivi_output_plane(&ctx->planes[2], ctx->frame.data[1], ctx->frame.linesize[1]);
     ff_ivi_output_plane(&ctx->planes[1], ctx->frame.data[2], ctx->frame.linesize[2]);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = ctx->frame;
 
     return buf_size;
index 7c6d1314de8edce696f052a653929da051ec7f59..22867f9d838aef4419b90c5d30b28643e8bcd383 100644 (file)
@@ -386,7 +386,7 @@ int  ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile);
  */
 void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch);
 
-int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt);
 av_cold int ff_ivi_decode_close(AVCodecContext *avctx);
 
index ed44e152cca51c5a38fd10e5fdf48ba5614e3123..8c919d290ea5d3327486f2789a1be84c8f9da86d 100644 (file)
@@ -129,7 +129,7 @@ static inline void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize, DSPC
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     JvContext *s           = avctx->priv_data;
@@ -185,7 +185,7 @@ static int decode_frame(AVCodecContext *avctx,
         s->palette_has_changed       = 0;
         memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
 
-        *data_size      = sizeof(AVFrame);
+        *got_frame = 1;
         *(AVFrame*)data = s->frame;
     }
 
index 719192cc9b7e069372d8ff05c5960c28dd48a58f..fc99b21a58ea8a27bb8f0c3297feb21dc2d07805 100644 (file)
@@ -43,7 +43,8 @@ static void decode_flush(AVCodecContext *avctx)
         avctx->release_buffer(avctx, &c->prev);
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     const uint8_t *buf_end = buf + avpkt->size;
@@ -155,7 +156,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     if (outcnt - maxcnt)
         av_log(avctx, AV_LOG_DEBUG, "frame finished with %d diff\n", outcnt - maxcnt);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->cur;
 
     if (c->prev.data[0])
index 2598590956e4642ffb0de84e14ac385441508390..d9fbbb0d71b94fec2d720e276b079b49364f159d 100644 (file)
@@ -243,7 +243,8 @@ static int kmvc_decode_inter_8x8(KmvcContext * ctx, int w, int h)
     return 0;
 }
 
-static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     KmvcContext *const ctx = avctx->priv_data;
     uint8_t *out, *src;
@@ -344,7 +345,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
         ctx->prev = ctx->frm1;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *) data = ctx->pic;
 
     /* always report that the buffer was completely consumed */
index f8db42e0ea3b0b610ffe3d3fb9351355c4d8d2d4..7d7a1a7ff19ed75f9f95ceba6686f719f98143db 100644 (file)
@@ -497,7 +497,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
  * @return number of consumed bytes on success or negative if decode fails
  */
 static int lag_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size, AVPacket *avpkt)
+                            void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -664,7 +664,7 @@ static int lag_decode_frame(AVCodecContext *avctx,
     }
 
     *picture = *p;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return buf_size;
 }
index 4ae2c99d9561ff8336515d38a50720b467797e87..f78401d09fb98b3b6841538fda283ced9954c8ff 100644 (file)
@@ -158,7 +158,7 @@ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, i
  * Decode a frame
  *
  */
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -461,7 +461,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         return -1;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index f9cf7e724ae5050730732fd4f587e945808a16d5..8f956f473f467bbeacf992ca05ad2b433bb5751f 100644 (file)
@@ -253,7 +253,7 @@ static av_cold int libopenjpeg_decode_init_thread_copy(AVCodecContext *avctx)
 }
 
 static int libopenjpeg_decode_frame(AVCodecContext *avctx,
-                                    void *data, int *data_size,
+                                    void *data, int *got_frame,
                                     AVPacket *avpkt)
 {
     uint8_t *buf = avpkt->data;
@@ -269,7 +269,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
     int ispacked = 0;
     int i;
 
-    *data_size = 0;
+    *got_frame = 0;
 
     // Check if input is a raw jpeg2k codestream or in jp2 wrapping
     if ((AV_RB32(buf)     == 12)           &&
@@ -412,7 +412,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
     }
 
     *output    = ctx->image;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
     ret        = buf_size;
 
 done:
index ae11cc5e2f2a38b6c487d45c071c2160776ceb88..2411fe63dda9c493bd93113fb05c48e108eb7a57 100644 (file)
@@ -207,7 +207,7 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext)
 }
 
 static int libschroedinger_decode_frame(AVCodecContext *avccontext,
-                                        void *data, int *data_size,
+                                        void *data, int *got_frame,
                                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -225,7 +225,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext,
     SchroParseUnitContext parse_ctx;
     LibSchroFrameContext *framewithpts = NULL;
 
-    *data_size = 0;
+    *got_frame = 0;
 
     parse_context_init(&parse_ctx, buf, buf_size);
     if (!buf_size) {
@@ -341,14 +341,14 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext,
         p_schro_params->dec_frame.linesize[2] = framewithpts->frame->components[2].stride;
 
         *(AVFrame*)data = p_schro_params->dec_frame;
-        *data_size      = sizeof(AVFrame);
+        *got_frame      = 1;
 
         /* Now free the frame resources. */
         libschroedinger_decode_frame_free(framewithpts->frame);
         av_free(framewithpts);
     } else {
         data       = NULL;
-        *data_size = 0;
+        *got_frame = 0;
     }
     return buf_size;
 }
index 56f706ed5060adf71b70db07e0f26fa82ada006f..6419e281b7ad3914c5d7b7a037217150952af823 100644 (file)
@@ -59,7 +59,7 @@ static av_cold int vp8_init(AVCodecContext *avctx)
 }
 
 static int vp8_decode(AVCodecContext *avctx,
-                      void *data, int *data_size, AVPacket *avpkt)
+                      void *data, int *got_frame, AVPacket *avpkt)
 {
     VP8Context *ctx = avctx->priv_data;
     AVFrame *picture = data;
@@ -100,7 +100,7 @@ static int vp8_decode(AVCodecContext *avctx,
         picture->linesize[1] = img->stride[1];
         picture->linesize[2] = img->stride[2];
         picture->linesize[3] = 0;
-        *data_size           = sizeof(AVPicture);
+        *got_frame           = 1;
     }
     return avpkt->size;
 }
index a837e4b9bd147700997a906b6df6796f498e30a6..6f49992a619f76c2a35be22cf5952b701a32d256 100644 (file)
@@ -158,7 +158,7 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -223,7 +223,7 @@ static int decode_frame(AVCodecContext *avctx,
         break;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = l->pic;
 
     return buf_size;
index a07d6e564bf5f3530c9d003434443bdfb17e5cba..b5a9d571a343c7125577482afe59e68078b0532f 100644 (file)
@@ -153,7 +153,7 @@ static inline void idct_put(MDECContext *a, int mb_x, int mb_y){
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -206,7 +206,7 @@ static int decode_frame(AVCodecContext *avctx,
     memset(p->qscale_table, a->qscale, a->mb_width);
 
     *picture   = a->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return (get_bits_count(&a->gb)+31)/32*4;
 }
index fd7efef34344d1f80a198ad78a1627548d73d226..8e35f9228c8ec46e7ad50c11e52ab63d5c0d2e4e 100644 (file)
@@ -301,7 +301,7 @@ static void prepare_avpic(MimicContext *ctx, AVPicture *dst, AVPicture *src)
 }
 
 static int mimic_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;
@@ -390,7 +390,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     *(AVFrame*)data = ctx->buf_ptrs[ctx->cur_index];
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
 
     ctx->prev_index = ctx->next_prev_index;
     ctx->cur_index  = ctx->next_cur_index;
index 8c8514f2c58005f4c02615f85dc5015e6ca2387f..9d5a8f31ef0d40ffa8a16744b1372e764802dede 100644 (file)
@@ -38,7 +38,7 @@ static uint32_t read_offs(AVCodecContext *avctx, GetBitContext *gb, uint32_t siz
 }
 
 static int mjpegb_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -137,7 +137,7 @@ read_header:
     //XXX FIXME factorize, this looks very similar to the EOI code
 
     *picture= *s->picture_ptr;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     if(!s->lossless){
         picture->quality= FFMAX3(s->qscale[0], s->qscale[1], s->qscale[2]);
index 04249dd97d0675cbef614213b890827aa1b5c645..104a63d5fd6640160fde1546b77c848c5d5572b3 100644 (file)
@@ -1436,7 +1436,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
     return start_code;
 }
 
-int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                           AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -1551,7 +1551,7 @@ eoi_parser:
                         goto not_the_end;
                     }
                     *picture   = *s->picture_ptr;
-                    *data_size = sizeof(AVFrame);
+                    *got_frame = 1;
 
                     if (!s->lossless) {
                         picture->quality      = FFMAX3(s->qscale[0],
index bfa987d3c526669a5b25a70c334934e11f8d19f7..89325ba7d725f70cb4ed9c356ca3ade70e5f9c61 100644 (file)
@@ -116,7 +116,7 @@ typedef struct MJpegDecodeContext {
 int ff_mjpeg_decode_init(AVCodecContext *avctx);
 int ff_mjpeg_decode_end(AVCodecContext *avctx);
 int ff_mjpeg_decode_frame(AVCodecContext *avctx,
-                          void *data, int *data_size,
+                          void *data, int *got_frame,
                           AVPacket *avpkt);
 int ff_mjpeg_decode_dqt(MJpegDecodeContext *s);
 int ff_mjpeg_decode_dht(MJpegDecodeContext *s);
index 9959d5fe0342e3ecf04dbd543818a6d8e77a88a2..784b939734c6aecb13b0175ce951646b2cb2dc4a 100644 (file)
@@ -172,7 +172,7 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert)
 }
 
 static int mm_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -209,7 +209,7 @@ static int mm_decode_frame(AVCodecContext *avctx,
 
     memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     return buf_size;
index a33d8d3eb071329dcba2acd606a2d4e81e869038..c2bd0f4d2bf5ff6e285cc312f7568f07dfffbdfd 100644 (file)
@@ -237,7 +237,7 @@ static void mp_decode_frame_helper(MotionPixelsContext *mp, GetBitContext *gb)
 }
 
 static int mp_decode_frame(AVCodecContext *avctx,
-                                 void *data, int *data_size,
+                                 void *data, int *got_frame,
                                  AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -295,7 +295,7 @@ static int mp_decode_frame(AVCodecContext *avctx,
     ff_free_vlc(&mp->vlc);
 
 end:
-    *data_size = sizeof(AVFrame);
+    *got_frame       = 1;
     *(AVFrame *)data = mp->frame;
     return buf_size;
 }
index 06305bf276f1631dd6c5302e5cbcab2eac5732e0..7cd8823682c38b0a598521571bfe5d71a2f0508e 100644 (file)
@@ -72,7 +72,7 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx)
 }
 
 static int msrle_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -128,7 +128,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
         ff_msrle_decode(avctx, (AVPicture*)&s->frame, avctx->bits_per_coded_sample, &s->gb);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index f72385f9fe31897caaeee8b12e04147ca4a05c8f..c9edb2e2d7d445f7e7fd00322ec4d8a6ccb3b10c 100644 (file)
@@ -135,7 +135,7 @@ static int decode_pal(MSS12Context *ctx, ArithCoder *acoder)
     return !!ncol;
 }
 
-static int mss1_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -180,7 +180,7 @@ static int mss1_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     memcpy(ctx->pic.data[1], c->pal, AVPALETTE_SIZE);
     ctx->pic.palette_has_changed = pal_changed;
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = ctx->pic;
 
     /* always report that the buffer was completely consumed */
index 7c65f14fc6a165ae536367f4a2479f39b2f2bc98..9746335132f11bffbdcaa6ef24fc7c612d210471 100644 (file)
@@ -461,7 +461,7 @@ typedef struct Rectangle {
 #define MAX_WMV9_RECTANGLES 20
 #define ARITH2_PADDING 2
 
-static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -744,7 +744,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     if (buf_size)
         av_log(avctx, AV_LOG_WARNING, "buffer not fully consumed\n");
 
-    *data_size       = sizeof(AVFrame);
+    *got_frame       = 1;
     *(AVFrame *)data = ctx->pic;
 
     return avpkt->size;
index a41db2224921da8b86de6a5942ded3ec724d379d..689daeee5d9ed95123d55e9811e76d37e35a76b7 100644 (file)
@@ -674,7 +674,7 @@ static av_cold void init_coders(MSS3Context *ctx)
     }
 }
 
-static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -740,7 +740,7 @@ static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     c->pic.key_frame = keyframe;
     c->pic.pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
     if (!bytestream2_get_bytes_left(&gb)) {
-        *data_size = sizeof(AVFrame);
+        *got_frame      = 1;
         *(AVFrame*)data = c->pic;
 
         return buf_size;
@@ -798,7 +798,7 @@ static int mss3_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         dst[2] += c->pic.linesize[2] * 8;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = c->pic;
 
     return buf_size;
index 1c850bc1c36a9d1a911d2cd9c1b1f71825de5502..7c714cb2648d3426c25597ec5b767fb6369e28d7 100644 (file)
@@ -506,7 +506,7 @@ static inline void mss4_update_dc_cache(MSS4Context *c, int mb_x)
     }
 }
 
-static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -566,7 +566,7 @@ static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     c->pic.pict_type = (frame_type == INTRA_FRAME) ? AV_PICTURE_TYPE_I
                                                    : AV_PICTURE_TYPE_P;
     if (frame_type == SKIP_FRAME) {
-        *data_size = sizeof(AVFrame);
+        *got_frame      = 1;
         *(AVFrame*)data = c->pic;
 
         return buf_size;
@@ -623,7 +623,7 @@ static int mss4_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         dst[2] += c->pic.linesize[2] * 16;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = c->pic;
 
     return buf_size;
index 644fecf66b708e1d99eca66096dfc3fdf8a30160..860a89311847197676c12086681e6b909e69370f 100644 (file)
@@ -286,7 +286,7 @@ static void msvideo1_decode_16bit(Msvideo1Context *s)
 }
 
 static int msvideo1_decode_frame(AVCodecContext *avctx,
-                                void *data, int *data_size,
+                                void *data, int *got_frame,
                                 AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -317,7 +317,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx,
     else
         msvideo1_decode_16bit(s);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index 13a0d4c0781c5e5a4b08f0df0ec38e6cc0ec1b8e..d81e9fc8535fea85637e8593f6b17ce68628c9ab 100644 (file)
@@ -156,7 +156,7 @@ static int mxpeg_check_dimensions(MXpegDecodeContext *s, MJpegDecodeContext *jpg
 }
 
 static int mxpeg_decode_frame(AVCodecContext *avctx,
-                          void *data, int *data_size,
+                          void *data, int *got_frame,
                           AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -293,7 +293,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
 
 the_end:
     if (jpg->got_picture) {
-        *data_size = sizeof(AVFrame);
+        *got_frame = 1;
         *picture = *jpg->picture_ptr;
         s->picture_index ^= 1;
         jpg->picture_ptr = &s->picture[s->picture_index];
@@ -302,7 +302,7 @@ the_end:
             if (!s->got_mxm_bitmask)
                 s->has_complete_frame = 1;
             else
-                *data_size = 0;
+                *got_frame = 0;
         }
     }
 
index 4beed8f9184e64a4d2080da907b1520d60d6eda1..0b47e974f555828b848996163dbb849736299faf 100644 (file)
@@ -138,7 +138,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height,
     return 1;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -262,7 +262,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     *picture   = c->pic;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     return orig_size;
 }
 
index a5c13960bde5901048acd9652a47b877921d64ff..1bd861215e8fb91c1ad7da49e185332f003cdfbd 100644 (file)
@@ -77,7 +77,7 @@ static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen)
         memset(dst, 0, (256 - pallen) * sizeof(*dst));
 }
 
-static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                             AVPacket *avpkt) {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -231,7 +231,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     *picture = s->picture;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     ret = buf - bufstart;
 end:
index 97d46ad94696fdf55e8c787eaf13ca672ee841cc..e769537706b53ba3714cdf47db100eeed3d1f701 100644 (file)
@@ -98,7 +98,7 @@ static const uint8_t cga_mode45_index[6][4] = {
 };
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     PicContext *s = avctx->priv_data;
@@ -238,7 +238,7 @@ static int decode_frame(AVCodecContext *avctx,
         return avpkt->size;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
     return avpkt->size;
 }
index 0e3805bdb44985cec76dfb106e341da9032b4d67..9c340eacb45f04274398de19da3d8804d435b94a 100644 (file)
@@ -383,7 +383,7 @@ static int png_decode_idat(PNGDecContext *s, int length)
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -611,7 +611,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     *picture= *s->current_picture;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     ret = bytestream2_tell(&s->gb);
  the_end:
index 6d2473831b1e01179c0f266353b958037b90eb56..b4b042cdf8c1341b8468584c262d9f14dc991d0f 100644 (file)
@@ -27,7 +27,7 @@
 
 
 static int pnm_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;
@@ -182,7 +182,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
         break;
     }
     *picture   = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return s->bytestream - s->bytestream_start;
 }
index 79995791d684b1008fdb717ae57f32df9ada111b..f7e32c998b3bd34d362eaa2f5182bafed9c54fae 100644 (file)
@@ -599,7 +599,7 @@ static int decode_picture(ProresContext *ctx, int pic_num,
 
 #define MOVE_DATA_PTR(nbytes) buf += (nbytes); buf_size -= (nbytes)
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     ProresContext *ctx = avctx->priv_data;
@@ -641,7 +641,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         MOVE_DATA_PTR(pic_data_size);
     }
 
-    *data_size       = sizeof(AVPicture);
+    *got_frame       = 1;
     *(AVFrame*) data = *avctx->coded_frame;
 
     return avpkt->size;
index c9b356440997c76023673610eff9e69387fbee27..77fd19615a462ab1553e4fba867c769e6df294b6 100644 (file)
@@ -38,7 +38,7 @@ static av_cold int ptx_init(AVCodecContext *avctx) {
     return 0;
 }
 
-static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                             AVPacket *avpkt) {
     const uint8_t *buf = avpkt->data;
     const uint8_t *buf_end = avpkt->data + avpkt->size;
@@ -99,7 +99,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     *picture = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     if (y < h) {
         av_log(avctx, AV_LOG_WARNING, "incomplete packet\n");
index 99692dc1709ade55c4e1224b02bdc047427f181a..ca982f340d554d810285ecc062c5e2a7183eaba1 100644 (file)
@@ -35,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;
@@ -140,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;
index 1ee764bb991b6f26344fd521f607062751bf5b80..4a918e71ece54f6148f26ae3176f6b3d5affde28 100644 (file)
@@ -240,7 +240,7 @@ static void qpeg_decode_inter(QpegContext *qctx, uint8_t *dst,
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     uint8_t ctable[128];
@@ -280,7 +280,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
     memcpy(a->pic.data[1], a->pal, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = a->pic;
 
     return avpkt->size;
index 3f173a596bb2054ee47ae805f3d98e446ad3d9c9..02091d04bf7bd3444305ded39f5fb4a134bb5bd4 100644 (file)
@@ -382,7 +382,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
 }
 
 static int qtrle_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     QtrleContext *s = avctx->priv_data;
@@ -478,7 +478,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
     }
 
 done:
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* always report that the buffer was completely consumed */
index 2224e329668c7fd02b55cb3b127e15916ff0fdc1..fd6d521dd0b75453813120f34c65d5604988115c 100644 (file)
@@ -35,7 +35,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     int h, w;
@@ -82,7 +82,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         dst_line += pic->linesize[0];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = *avctx->coded_frame;
 
     return avpkt->size;
index 449755f9b22abbb0cc52d69a56d167f14646654d..16ee64e47ae534051688181bdf30c1900c29b0d6 100644 (file)
@@ -113,7 +113,7 @@ static void flip(AVCodecContext *avctx, AVPicture * picture){
 }
 
 static int raw_decode(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -196,7 +196,7 @@ static int raw_decode(AVCodecContext *avctx,
         }
     }
 
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
     return buf_size;
 }
 
index 9eea92a4eeda5ff534eb3bdd99c3099d88c10717..c9eb93eb62bad2cf5a744586dde30bc155dadc1e 100644 (file)
@@ -172,7 +172,7 @@ static av_cold int rl2_decode_init(AVCodecContext *avctx)
 
 
 static int rl2_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -195,7 +195,7 @@ static int rl2_decode_frame(AVCodecContext *avctx,
     /** make the palette available on the way out */
     memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->frame;
 
     /** report that the buffer was completely consumed */
index bf5664b9e58eab1c57c98c00c8fc3da9ccc8aac0..2543cecb2777d0aba8cc8a60827200014688648e 100644 (file)
@@ -169,7 +169,7 @@ static av_cold int roq_decode_init(AVCodecContext *avctx)
 }
 
 static int roq_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -190,7 +190,7 @@ static int roq_decode_frame(AVCodecContext *avctx,
     bytestream2_init(&s->gb, buf, buf_size);
     roqvideo_decode_frame(s);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = *s->current_frame;
 
     /* shuffle frames */
index 876c9b7f8fc921280977a6d1bb8d2f50e6924fbd..57d4d2d228841df9d013226a8907bb3d85749eea 100644 (file)
@@ -244,7 +244,7 @@ static av_cold int rpza_decode_init(AVCodecContext *avctx)
 }
 
 static int rpza_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -263,7 +263,7 @@ static int rpza_decode_frame(AVCodecContext *avctx,
 
     rpza_decode_stream(s);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* always report that the buffer was completely consumed */
index 8769eae2094b54d318ee01a8a17b9e25fd833d62..73af3622e6be0bdec614d9708a22c6935a469493 100644 (file)
@@ -638,7 +638,7 @@ static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n)
 }
 
 static int rv10_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -703,7 +703,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
         }
 
         if(s->last_picture_ptr || s->low_delay){
-            *data_size = sizeof(AVFrame);
+            *got_frame = 1;
             ff_print_debug_info(s, pict);
         }
         s->current_picture_ptr= NULL; //so we can detect if frame_end wasnt called (find some nicer solution...)
index e7a59c4bed449239d2743f77a6b5c7ec4db034ce..f40e2828ab3f293a4237f055cccd4f0c301e48b0 100644 (file)
@@ -133,7 +133,7 @@ typedef struct RV34DecContext{
  */
 int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
 int ff_rv34_decode_init(AVCodecContext *avctx);
-int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt);
+int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt);
 int ff_rv34_decode_end(AVCodecContext *avctx);
 int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx);
 int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src);
index e7791b7e05cb17afdbeaa74c910e0b0d93088160..0e72751564609c1b3e445a1687549c8d0d39ec2b 100644 (file)
@@ -151,7 +151,7 @@ static int read_uncompressed_sgi(unsigned char* out_buf, uint8_t* out_end,
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     SgiState *s = avctx->priv_data;
@@ -233,7 +233,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;
index 0d11e9cd8213bb98ac815b8e5616841be2c1fed4..b20a7b6d105e50ca1dbf6efdb173871443aac5f2 100644 (file)
@@ -349,7 +349,8 @@ static av_always_inline int smk_get_code(GetBitContext *gb, int *recode, int *la
     return v;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     SmackVContext * const smk = avctx->priv_data;
     uint8_t *out;
@@ -496,7 +497,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
 
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = smk->pic;
 
     /* always report that the buffer was completely consumed */
index 38bf804c8c0be517ac5e774f4215f578712c0453..1834003a3931f65cfe10c20f02fc907100f4ee8e 100644 (file)
@@ -422,7 +422,7 @@ static av_cold int smc_decode_init(AVCodecContext *avctx)
 }
 
 static int smc_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -447,7 +447,7 @@ static int smc_decode_frame(AVCodecContext *avctx,
 
     smc_decode_stream(s);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* always report that the buffer was completely consumed */
index 50c55425ab071d8e6d1d79cc41f3182c1781957b..603cef0c078fb64455a10f0e63ff6d4e8056127c 100644 (file)
@@ -382,7 +382,9 @@ static int decode_blocks(SnowContext *s){
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
+{
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     SnowContext *s = avctx->priv_data;
@@ -542,7 +544,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     else
         *picture= s->mconly_picture;
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     bytes_read= c->bytestream - c->bytestream_start;
     if(bytes_read ==0) av_log(s->avctx, AV_LOG_ERROR, "error at end of frame\n"); //FIXME
index 29b00592f1ddcc09373276f5b0855f910c4eba40..90c34911bdaec6a15702d498358da61f67f05ca3 100644 (file)
@@ -31,7 +31,7 @@
 
 
 static int sp5x_decode_frame(AVCodecContext *avctx,
-                              void *data, int *data_size,
+                              void *data, int *got_frame,
                               AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -86,7 +86,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
     av_init_packet(&avpkt_recoded);
     avpkt_recoded.data = recoded;
     avpkt_recoded.size = j;
-    i = ff_mjpeg_decode_frame(avctx, data, data_size, &avpkt_recoded);
+    i = ff_mjpeg_decode_frame(avctx, data, got_frame, &avpkt_recoded);
 
     av_free(recoded);
 
index 310ac2c7b9bce10a5b89ddfe37877db7a4e4721e..a44cdf026a06bbd52eb392201852dae2bb505e94 100644 (file)
@@ -40,7 +40,8 @@ static av_cold int sunrast_init(AVCodecContext *avctx) {
 }
 
 static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
-                                int *data_size, AVPacket *avpkt) {
+                                int *got_frame, AVPacket *avpkt)
+{
     const uint8_t *buf       = avpkt->data;
     const uint8_t *buf_end   = avpkt->data + avpkt->size;
     SUNRASTContext * const s = avctx->priv_data;
@@ -181,7 +182,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     *picture   = s->picture;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return buf - bufstart;
 }
index 6e096f3f4370cbafd815c27bba1022f1e9ac9a1e..4fc3a588f4df590c52daed1093a7037e14dbd790 100644 (file)
@@ -587,7 +587,7 @@ static int svq1_decode_frame_header(GetBitContext *bitbuf, MpegEncContext *s)
 }
 
 static int svq1_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;
@@ -708,7 +708,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
 
     ff_MPV_frame_end(s);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     result     = buf_size;
 
 err:
index ac8d9c1a898cb33e9ac74eb1146d86cfd113ab97..f2c14ea739533e36a5c5318e8cd4e3aa799f9f5f 100644 (file)
@@ -1003,7 +1003,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
 }
 
 static int svq3_decode_frame(AVCodecContext *avctx, void *data,
-                             int *data_size, AVPacket *avpkt)
+                             int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     SVQ3Context *svq3  = avctx->priv_data;
@@ -1017,7 +1017,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
         if (s->next_picture_ptr && !s->low_delay) {
             *(AVFrame *) data   = s->next_picture.f;
             s->next_picture_ptr = NULL;
-            *data_size          = sizeof(AVFrame);
+            *got_frame          = 1;
         }
         return 0;
     }
@@ -1139,7 +1139,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
 
     /* Do not output the last pic after seeking. */
     if (s->last_picture_ptr || s->low_delay)
-        *data_size = sizeof(AVFrame);
+        *got_frame = 1;
 
     return buf_size;
 }
index 027275bd2cc011c716196065c082a49c396360a5..3bbed94dcde99dfcd203701f834b4dad5141b4e2 100644 (file)
@@ -95,7 +95,7 @@ static int targa_decode_rle(AVCodecContext *avctx, TargaContext *s,
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     TargaContext * const s = avctx->priv_data;
@@ -233,7 +233,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     *picture   = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return avpkt->size;
 }
index 98f6477b765858fee6b5be44465cd914092603ad..a9064eca2417a1a58d5a013ed9ee8bfbbb06fc95 100644 (file)
@@ -222,7 +222,7 @@ static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
 }
 
 static int seqvideo_decode_frame(AVCodecContext *avctx,
-                                 void *data, int *data_size,
+                                 void *data, int *got_frame,
                                  AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -240,7 +240,7 @@ static int seqvideo_decode_frame(AVCodecContext *avctx,
     if (seqvideo_decode(seq, buf, buf_size))
         return AVERROR_INVALIDDATA;
 
-    *data_size = sizeof(AVFrame);
+    *got_frame       = 1;
     *(AVFrame *)data = seq->frame;
 
     return buf_size;
index c42a65b9f4d29d31803c8bff031d6207a2d6bb66..8c40006aa55aa2c93d3610353a001ac6d75205e3 100644 (file)
@@ -540,7 +540,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start,
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size, AVPacket *avpkt)
+                        void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -655,7 +655,7 @@ static int decode_frame(AVCodecContext *avctx,
         }
     }
     *picture   = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index c56635e72248e19f8d64fddf4b8393081119038d..d4e5aa1398c44944eea5441f3017b64a627d118e 100644 (file)
@@ -39,7 +39,7 @@ typedef struct TMVContext {
 } TMVContext;
 
 static int tmv_decode_frame(AVCodecContext *avctx, void *data,
-                            int *data_size, AVPacket *avpkt)
+                            int *got_frame, AVPacket *avpkt)
 {
     TMVContext *tmv    = avctx->priv_data;
     const uint8_t *src = avpkt->data;
@@ -59,7 +59,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
     if (avpkt->size < 2*char_rows*char_cols) {
         av_log(avctx, AV_LOG_ERROR,
                "Input buffer too small, truncated sample?\n");
-        *data_size = 0;
+        *got_frame = 0;
         return -1;
     }
 
@@ -81,7 +81,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
         dst += tmv->pic.linesize[0] * 8;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = tmv->pic;
     return avpkt->size;
 }
index c2e15894e4f2021e9176c441e5ffa61be08c5166..f6ca35c7b7a836a8b972d65a1a8b761b56542f25 100644 (file)
@@ -839,7 +839,7 @@ static void truemotion1_decode_24bit(TrueMotion1Context *s)
 
 
 static int truemotion1_decode_frame(AVCodecContext *avctx,
-                                    void *data, int *data_size,
+                                    void *data, int *got_frame,
                                     AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -866,7 +866,7 @@ static int truemotion1_decode_frame(AVCodecContext *avctx,
         truemotion1_decode_16bit(s);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index b540eda3f642f2b36b7daadad9ae00cb1e2da105..5b441e11eb42f37d7116ea1eebf2ff808922036a 100644 (file)
@@ -811,7 +811,7 @@ static const int tm2_stream_order[TM2_NUM_STREAMS] = {
 };
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -861,7 +861,7 @@ static int decode_frame(AVCodecContext *avctx,
         p->pict_type = AV_PICTURE_TYPE_P;
 
     l->cur = !l->cur;
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = l->pic;
     av_free(swbuf);
 
index db2805ebafa0a3d375e43ea7ac120523902bf3dc..5b1c7be16e9db2738a6daa31bf4e7826325edb21 100644 (file)
@@ -71,7 +71,8 @@ typedef struct TsccContext {
  * Decode a frame
  *
  */
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -124,7 +125,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         memcpy(c->pic.data[1], c->pal, AVPALETTE_SIZE);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index 36287137ad8695502c59a0a663af60f0aa4889bf..b7f1b8899bc57bf5a6f561b47dcea2aa629517b3 100644 (file)
@@ -211,7 +211,7 @@ static int tscc2_decode_slice(TSCC2Context *c, int mb_y,
 }
 
 static int tscc2_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;
@@ -238,7 +238,7 @@ static int tscc2_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     if (frame_type == 0) {
-        *data_size      = sizeof(AVFrame);
+        *got_frame      = 1;
         *(AVFrame*)data = c->pic;
 
         return buf_size;
@@ -322,7 +322,7 @@ static int tscc2_decode_frame(AVCodecContext *avctx, void *data,
         bytestream2_skip(&gb, size);
     }
 
-    *data_size      = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index 8e2605f053ac731f73262e0bb9bc39372c1bf837..8a10385b92cb42e09779e4bc19bc8207cc1bf52b 100644 (file)
@@ -41,7 +41,7 @@ static av_cold int txd_init(AVCodecContext *avctx) {
     return 0;
 }
 
-static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                             AVPacket *avpkt) {
     TXDContext * const s = avctx->priv_data;
     GetByteContext gb;
@@ -135,7 +135,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     *picture   = s->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return avpkt->size;
 
index 41faa3de9757028eb71a172b0c1e58540b96a660..275319605d108a177217664017c129cf82c6be6f 100644 (file)
@@ -209,7 +209,7 @@ static void ulti_grad(AVFrame *frame, int x, int y, uint8_t *Y, int chroma, int
 }
 
 static int ulti_decode_frame(AVCodecContext *avctx,
-                             void *data, int *data_size,
+                             void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -406,7 +406,7 @@ static int ulti_decode_frame(AVCodecContext *avctx,
         }
     }
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data= s->frame;
 
     return buf_size;
index c35a5692feae738fc57011618cb23d819e5728bb..3f8f690ee04720a831ee7d2399ea3e7ad54413b3 100644 (file)
@@ -320,7 +320,7 @@ static void restore_median_il(uint8_t *src, int step, int stride,
     }
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -465,7 +465,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     c->pic.pict_type = AV_PICTURE_TYPE_I;
     c->pic.interlaced_frame = !!c->interlaced;
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index 29a93a8917a2c3434f3407525c7208c7dcf9e40b..6c53e362bad57e2ef3c92a1a11b8726fe379a55c 100644 (file)
@@ -43,7 +43,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     int h, w;
@@ -109,7 +109,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         v += pic->linesize[2] / 2 - avctx->width / 2;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = *avctx->coded_frame;
 
     return avpkt->size;
index 0b9753f733b66d494fd95c375ffbfc0d880ee9f6..0b1b72161780332e2bf47ac2fa195f5054ebb075 100644 (file)
@@ -38,7 +38,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     int y=0;
     int width= avctx->width;
@@ -119,7 +120,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         }
     }
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data= *avctx->coded_frame;
 
     return avpkt->size;
index 1f44b417a6480d87e4daf242bbb20a02699b5f34..efd20931346e195d1616d5a0e29dbeb8a816286c 100644 (file)
@@ -50,7 +50,7 @@ static av_cold int v410_decode_init(AVCodecContext *avctx)
 }
 
 static int v410_decode_frame(AVCodecContext *avctx, void *data,
-                             int *data_size, AVPacket *avpkt)
+                             int *got_frame, AVPacket *avpkt)
 {
     AVFrame *pic = avctx->coded_frame;
     uint8_t *src = avpkt->data;
@@ -96,7 +96,7 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data,
         v += pic->linesize[2] >> 1;
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = *pic;
 
     return avpkt->size;
index f5e15cdb18854ef332e243fde6c0ee419a44c6e3..1e241e7d5afb997d07e3f7b65daf105fb1645acb 100644 (file)
@@ -185,7 +185,8 @@ static int vb_decode_framedata(VBDecContext *c, int offset)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     VBDecContext * const c = avctx->priv_data;
     uint8_t *outptr, *srcptr;
@@ -235,7 +236,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
 
     FFSWAP(uint8_t*, c->frame, c->prev_frame);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index b761787ef08dbdfe6d3a708aa256dba3fc36e01d..228b1bd61a963dfa8f49ab3d0e662790e0af3af9 100644 (file)
@@ -112,7 +112,7 @@ static void vble_restore_plane(VBLEContext *ctx, int plane, int offset,
     }
 }
 
-static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                              AVPacket *avpkt)
 {
     VBLEContext *ctx = avctx->priv_data;
@@ -165,7 +165,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         vble_restore_plane(ctx, 2, offset, width_uv, height_uv);
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame       = 1;
     *(AVFrame *)data = *pic;
 
     return avpkt->size;
index 5e3f96416bd002e0e742908082d3604d9fa75160..ce690f419662742bd315ab43179740e4da4894bc 100644 (file)
@@ -5308,7 +5308,7 @@ av_cold int ff_vc1_decode_end(AVCodecContext *avctx)
  * @todo TODO: Handle VC-1 IDUs (Transport level?)
  */
 static int vc1_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, n_slices = 0, i;
@@ -5331,7 +5331,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
             *pict = s->next_picture_ptr->f;
             s->next_picture_ptr = NULL;
 
-            *data_size = sizeof(AVFrame);
+            *got_frame = 1;
         }
 
         return 0;
@@ -5647,7 +5647,7 @@ image:
             goto err;
 #endif
         *pict      = v->sprite_output_frame;
-        *data_size = sizeof(AVFrame);
+        *got_frame = 1;
     } else {
         if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
             *pict = s->current_picture_ptr->f;
@@ -5655,7 +5655,7 @@ image:
             *pict = s->last_picture_ptr->f;
         }
         if (s->last_picture_ptr || s->low_delay) {
-            *data_size = sizeof(AVFrame);
+            *got_frame = 1;
             ff_print_debug_info(s, pict);
         }
     }
index 1614dd306193dc7d2ad95ed7fe78bb3e03f66583..d0805a37595dced1022f722ffb920e05aad31785 100644 (file)
@@ -64,7 +64,7 @@ static av_cold int vcr1_decode_end(AVCodecContext *avctx)
 }
 
 static int vcr1_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;
@@ -133,7 +133,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     *picture   = a->picture;
-    *data_size = sizeof(AVPicture);
+    *got_frame = 1;
 
     return buf_size;
 }
index 14b512acb1812323d50e51b88ed918e491eeb443..cffc00aa40ed0b2b483638ea0ecbe1b81f4750c6 100644 (file)
@@ -419,7 +419,7 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
 }
 
 static int vmdvideo_decode_frame(AVCodecContext *avctx,
-                                 void *data, int *data_size,
+                                 void *data, int *got_frame,
                                  AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -448,7 +448,7 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx,
     if (s->frame.data[0])
         avctx->release_buffer(avctx, &s->frame);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->prev_frame;
 
     /* report that the buffer was completely consumed */
index 3153be6844f81a99a9d3d13d73c6940fe24b46a0..4071cdf51a833a182524aec4b2647a6a4f168cc4 100644 (file)
@@ -285,7 +285,8 @@ static int decode_hextile(VmncContext *c, uint8_t* dst, const uint8_t* src, int
     return src - ssrc;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+                        AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -446,7 +447,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
             put_cursor(outptr, c->pic.linesize[0], c, c->cur_x, c->cur_y);
         }
     }
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */
index e8127597c628677fcab76e981570023e15260c9f..de23f285e5164f1b7497ee55b1c88d200594b7e6 100644 (file)
@@ -1910,7 +1910,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
 }
 
 static int vp3_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -2046,7 +2046,7 @@ static int vp3_decode_frame(AVCodecContext *avctx,
     }
     vp3_draw_horiz_band(s, s->avctx->height);
 
-    *data_size=sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data= s->current_frame;
 
     if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_FRAME))
index c9490e770b687f940981f0f376782fa428f337b2..47fe2fb11cf245c8736e1e3588704a0c9e8e64fa 100644 (file)
@@ -487,7 +487,7 @@ static int vp56_size_changed(AVCodecContext *avctx)
     return 0;
 }
 
-int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                          AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -654,7 +654,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     p->qscale_table = s->qscale_table;
     p->qscale_type = FF_QSCALE_TYPE_VP56;
     *(AVFrame*)data = *p;
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
 
     return avpkt->size;
 }
index 27539c7932cc9c90aa9b4cd7c88cbc7797870db2..d5feaa381aabf4d497a4a3e33c68701352e00e3c 100644 (file)
@@ -176,7 +176,7 @@ struct vp56_context {
 void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
 int ff_vp56_free(AVCodecContext *avctx);
 void ff_vp56_init_dequant(VP56Context *s, int quantizer);
-int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                          AVPacket *avpkt);
 
 
index d9902c4c484dd13256cb600ae1001aaeb0063630..8044e8db33ca44399885f2337aa94c079fd9884e 100644 (file)
@@ -1855,7 +1855,7 @@ static int vp8_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata,
     return 0;
 }
 
-static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     VP8Context *s = avctx->priv_data;
@@ -2004,7 +2004,7 @@ skip_decode:
 
     if (!s->invisible) {
         *(AVFrame*)data = *curframe;
-        *data_size = sizeof(AVFrame);
+        *got_frame      = 1;
     }
 
     return avpkt->size;
index e641a7583059da019bd22afa7cb0ae397ad7a820..182f2ce997ce7c2645b5a6ddf92bb344c011c60c 100644 (file)
@@ -580,7 +580,7 @@ static int vqa_decode_chunk(VqaContext *s)
 }
 
 static int vqa_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     VqaContext *s = avctx->priv_data;
@@ -602,7 +602,7 @@ static int vqa_decode_frame(AVCodecContext *avctx,
     memcpy(s->frame.data[1], s->palette, PALETTE_COUNT * 4);
     s->frame.palette_has_changed = 1;
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     /* report that the buffer was completely consumed */
index 3daac0b1607613a9a71926054afca22f1ff63c00..9021ec6a62e4dd0a23d48b6bae446f11fb27f86e 100644 (file)
@@ -59,7 +59,7 @@ static inline int wnv1_get_code(WNV1Context *w, int base_value)
 }
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -124,7 +124,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = l->pic;
     av_free(rbuf);
 
index 871bc13681ab86e3231581df56347fea85304f1d..f036d78eb850e81b617d68ab2ac8d8c46de78b88 100644 (file)
@@ -493,7 +493,7 @@ static const uint8_t gamma_lookup[256] = {
 #endif
 
 static int xan_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -582,7 +582,7 @@ static int xan_decode_frame(AVCodecContext *avctx,
     if (s->last_frame.data[0])
         avctx->release_buffer(avctx, &s->last_frame);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->current_frame;
 
     /* shuffle frames */
index a8c392a7678c22f48bd532be45871e982dee934f..1cadeab5612d178a282401247dc4366a72a66daa 100644 (file)
@@ -41,7 +41,7 @@ static const int xl_table[32] = {
  120, 121, 122, 123, 124, 125, 126, 127};
 
 static int decode_frame(AVCodecContext *avctx,
-                        void *data, int *data_size,
+                        void *data, int *got_frame,
                         AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -122,7 +122,7 @@ static int decode_frame(AVCodecContext *avctx,
         V += a->pic.linesize[2];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = a->pic;
 
     return buf_size;
index 07d1e2ce5783ad9b8124fe388f7c6d248dde2ec8..274e4fa1039e9e3e1c5fb05bbd9cbe36e513f297 100644 (file)
@@ -36,7 +36,7 @@ static av_cold int xwd_decode_init(AVCodecContext *avctx)
 }
 
 static int xwd_decode_frame(AVCodecContext *avctx, void *data,
-                            int *data_size, AVPacket *avpkt)
+                            int *got_frame, AVPacket *avpkt)
 {
     AVFrame *p = avctx->coded_frame;
     const uint8_t *buf = avpkt->data;
@@ -242,7 +242,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
         ptr += p->linesize[0];
     }
 
-    *data_size = sizeof(AVFrame);
+    *got_frame       = 1;
     *(AVFrame *)data = *p;
 
     return buf_size;
index 2a5a8ca6312e647af2446d167e4201aadc7e3f25..9e874540b59f6f9bcd0ed6764fd2b9ff038ac3c9 100644 (file)
@@ -357,7 +357,7 @@ static int xan_decode_frame_type1(AVCodecContext *avctx)
 }
 
 static int xan_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     XanContext *s = avctx->priv_data;
@@ -389,7 +389,7 @@ static int xan_decode_frame(AVCodecContext *avctx,
     if (ret)
         return ret;
 
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = s->pic;
 
     return avpkt->size;
index 0240a8cc9fcdd74fcc1efe244b63a987471505c0..c3bb57711945f9d6fd6fc1ffe465aa3b79bb4959 100644 (file)
@@ -188,7 +188,7 @@ static void yop_next_macroblock(YopDecContext *s)
     s->dstptr += 2;
 }
 
-static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
+static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     YopDecContext *s = avctx->priv_data;
@@ -243,7 +243,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
         yop_next_macroblock(s);
     }
 
-    *data_size        = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *) data = s->frame;
     return avpkt->size;
 }
index e5edb5f0ede8ad0d072827108a8771315ac83c5d..f54abb1c1bc63d523144ab30b19c82ae54d0d8d5 100644 (file)
@@ -29,7 +29,7 @@ typedef struct {
 } ZeroCodecContext;
 
 static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
-                                  int *data_size, AVPacket *avpkt)
+                                  int *got_frame, AVPacket *avpkt)
 {
     ZeroCodecContext *zc = avctx->priv_data;
     AVFrame *pic         = avctx->coded_frame;
@@ -98,7 +98,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
     if (prev_pic->data[0])
         avctx->release_buffer(avctx, prev_pic);
 
-    *data_size       = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame *)data = *pic;
 
     /* Store the previous frame for use later.
index 33949ce25a2787475d400a363c0a8078d0782d8e..761974c9020bad86f0100b2511920f12a938d47f 100644 (file)
@@ -398,7 +398,7 @@ static int zmbv_decode_intra(ZmbvContext *c)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
+static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
@@ -599,7 +599,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         }
         FFSWAP(uint8_t *, c->cur, c->prev);
     }
-    *data_size = sizeof(AVFrame);
+    *got_frame = 1;
     *(AVFrame*)data = c->pic;
 
     /* always report that the buffer was completely consumed */