[FFmpeg-cvslog] lavc: fix decode_frame() third parameter semantics for video decoders

Anton Khirnov git at videolan.org
Wed Dec 5 17:24:55 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Nov 13 19:35:22 2012 +0100| [df9b9567518f2840d79a4a96b447ebe1aa326408] | committer: Anton Khirnov

lavc: fix decode_frame() third parameter semantics for video decoders

It's got_frame, not data size

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=df9b9567518f2840d79a4a96b447ebe1aa326408
---

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

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index e3f49b3..f78a0a2 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -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();
 
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index ea428da..306fd52 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -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 */
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index 60bf7c6..cd1df36 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -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 */
diff --git a/libavcodec/anm.c b/libavcodec/anm.c
index de563dd..fc328bb 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -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;
 }
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index bee14b8..edd373d 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -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;
 }
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c
index 9f6b93d..a53ba77 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -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();
 
diff --git a/libavcodec/aura.c b/libavcodec/aura.c
index 9ca2ef8..d0fe946 100644
--- a/libavcodec/aura.c
+++ b/libavcodec/aura.c
@@ -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;
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index f6535a2..98a53f2 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -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;
 }
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index c1f95ed..316adb6 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -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;
diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c
index 03d06fa..50b20ba 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -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;
 }
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 733b5bd..059601d 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -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')
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index ae16855..648d0ac 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -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;
 }
diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c
index 762a7fb..a7f21ec 100644
--- a/libavcodec/bmv.c
+++ b/libavcodec/bmv.c
@@ -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 */
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index 07acb26..e8071ac 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -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;
 }
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 5619071..af0309c 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -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;
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index 9c9583d..e4ed83b 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -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;
     }
 
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index b51a2cb..0b3d59c 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -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;
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index e6e2df2..c6f4ffa 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -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 */
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index c4b12b1..9ba5138 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -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;
 }
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index 188df1b..2c1b2e7 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -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;
 }
 
diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c
index a11fee2..49cf64c 100644
--- a/libavcodec/cyuv.c
+++ b/libavcodec/cyuv.c
@@ -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;
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 4f14833..119be70 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -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;
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index e988d68..7cc17c4 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -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;
 }
 
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 2b1c7f8..7c01bab 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -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;
 }
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index 8797952..39b6a4c 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -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;
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index b4cb23f..bc1bb55 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -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 */
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index e634bbe..0f590f1 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -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 */
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index 4ee364b..30983f8 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -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;
diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c
index d3233bb..0dce066 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -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;
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index ec74051..9f4d858 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -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)
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index 9e3a3e6..d6a6e55 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -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;
diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
index 170eeb1..46644ab 100644
--- a/libavcodec/eatgv.c
+++ b/libavcodec/eatgv.c
@@ -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;
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 51232d0..f9141e2 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -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;
 }
diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c
index dce4d04..a27ab68 100644
--- a/libavcodec/escape124.c
+++ b/libavcodec/escape124.c
@@ -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;
 }
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 5b1c80c..b1dec7d 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -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);
 
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index d12e234..3c5a35c 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -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)
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index 2b9b290..02bfc75 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -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);
     }
 
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 3df1280..ba2f32a 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -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;
 }
diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c
index f4d1cc1..3f8f6ba 100644
--- a/libavcodec/frwu.c
+++ b/libavcodec/frwu.c
@@ -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;
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index d5f1c42..8f1d694 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -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;
 }
 
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 7780888..55453c1 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -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);
 }
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 2a1ae48..beb32c4 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -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,
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 72bf052..6281ed2 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -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);
     }
 
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7bdd6f1..f04d878 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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);
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 3da1de8..511b326 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -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;
 }
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c
index 8ce045d..273eca6 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -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 */
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 4bbb5dd..99da7b5 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -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;
 }
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index 76592d6..1dd151d 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -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;
 }
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index fe2ee93..261c651 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -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;
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 49db10d..3f098ac 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -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 */
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 58a00ce..cc5224c 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -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;
diff --git a/libavcodec/ivi_common.h b/libavcodec/ivi_common.h
index 7c6d131..22867f9 100644
--- a/libavcodec/ivi_common.h
+++ b/libavcodec/ivi_common.h
@@ -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);
 
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index ed44e15..8c919d2 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -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;
     }
 
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index 719192c..fc99b21 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -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])
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index 2598590..d9fbbb0 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -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 */
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index f8db42e..7d7a1a7 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -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;
 }
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 4ae2c99..f78401d 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -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 */
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index f9cf7e7..8f956f4 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -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:
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index ae11cc5..2411fe6 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
@@ -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;
 }
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 56f706e..6419e28 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -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;
 }
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index a837e4b..6f49992 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -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;
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index a07d6e5..b5a9d57 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -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;
 }
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index fd7efef..8e35f92 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -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;
diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
index 8c8514f..9d5a8f3 100644
--- a/libavcodec/mjpegbdec.c
+++ b/libavcodec/mjpegbdec.c
@@ -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]);
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 04249dd..104a63d 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -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],
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index bfa987d..89325ba 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -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);
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 9959d5f..784b939 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -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;
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index a33d8d3..c2bd0f4 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -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;
 }
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 06305bf..7cd8823 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -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 */
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index f72385f..c9edb2e 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -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 */
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index 7c65f14..9746335 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -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;
diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c
index a41db22..689daee 100644
--- a/libavcodec/mss3.c
+++ b/libavcodec/mss3.c
@@ -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;
diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c
index 1c850bc..7c714cb 100644
--- a/libavcodec/mss4.c
+++ b/libavcodec/mss4.c
@@ -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;
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index 644fecf..860a893 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -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 */
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index 13a0d4c..d81e9fc 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -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;
         }
     }
 
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 4beed8f..0b47e97 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -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;
 }
 
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index a5c1396..1bd8612 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -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:
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 97d46ad..e769537 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -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;
 }
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 0e3805b..9c340ea 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -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:
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index 6d24738..b4b042c 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -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;
 }
diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 7999579..f7e32c9 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -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;
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index c9b3564..77fd196 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -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");
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 99692dc..ca982f3 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -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;
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index 1ee764b..4a918e7 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -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;
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 3f173a5..02091d0 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -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 */
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 2224e32..fd6d521 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -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;
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 449755f..16ee64e 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -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;
 }
 
diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c
index 9eea92a..c9eb93e 100644
--- a/libavcodec/rl2.c
+++ b/libavcodec/rl2.c
@@ -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 */
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index bf5664b..2543cec 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -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 */
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index 876c9b7..57d4d2d 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -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 */
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 8769eae..73af362 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -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...)
diff --git a/libavcodec/rv34.h b/libavcodec/rv34.h
index e7a59c4..f40e282 100644
--- a/libavcodec/rv34.h
+++ b/libavcodec/rv34.h
@@ -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);
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index e7791b7..0e72751 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -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;
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 0d11e9c..b20a7b6 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -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 */
diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 38bf804..1834003 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -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 */
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index 50c5542..603cef0 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -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
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index 29b0059..90c3491 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -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);
 
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 310ac2c..a44cdf0 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -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;
 }
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 6e096f3..4fc3a58 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -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:
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index ac8d9c1..f2c14ea 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -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;
 }
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 027275b..3bbed94 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -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;
 }
diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
index 98f6477..a9064ec 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -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;
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index c42a65b..8c40006 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -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;
 }
diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c
index c56635e..d4e5aa1 100644
--- a/libavcodec/tmv.c
+++ b/libavcodec/tmv.c
@@ -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;
 }
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index c2e1589..f6ca35c 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -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 */
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index b540eda..5b441e1 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -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);
 
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index db2805e..5b1c7be 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -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 */
diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c
index 3628713..b7f1b88 100644
--- a/libavcodec/tscc2.c
+++ b/libavcodec/tscc2.c
@@ -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 */
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index 8e2605f..8a10385 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -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;
 
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c
index 41faa3d..2753196 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -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;
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index c35a569..3f8f690 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -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 */
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 29a93a8..6c53e36 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -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;
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index 0b9753f..0b1b721 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -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;
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
index 1f44b41..efd2093 100644
--- a/libavcodec/v410dec.c
+++ b/libavcodec/v410dec.c
@@ -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;
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index f5e15cd..1e241e7 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -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 */
diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index b761787..228b1bd 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -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;
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 5e3f964..ce690f4 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -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);
         }
     }
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index 1614dd3..d0805a3 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -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;
 }
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 14b512a..cffc00a 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -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 */
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index 3153be6..4071cdf 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -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 */
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index e812759..de23f28 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -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))
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index c9490e7..47fe2fb 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -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;
 }
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index 27539c7..d5feaa3 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -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);
 
 
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index d9902c4..8044e8d 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -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;
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index e641a75..182f2ce 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -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 */
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 3daac0b..9021ec6 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -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);
 
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 871bc13..f036d78 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -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 */
diff --git a/libavcodec/xl.c b/libavcodec/xl.c
index a8c392a..1cadeab 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -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;
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index 07d1e2c..274e4fa 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -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;
diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c
index 2a5a8ca..9e87454 100644
--- a/libavcodec/xxan.c
+++ b/libavcodec/xxan.c
@@ -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;
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 0240a8c..c3bb577 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -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;
 }
diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c
index e5edb5f..f54abb1 100644
--- a/libavcodec/zerocodec.c
+++ b/libavcodec/zerocodec.c
@@ -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.
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 33949ce..761974c 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -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 */



More information about the ffmpeg-cvslog mailing list