aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-05 17:15:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-05 17:20:19 +0100
commitfc1152de410323cf41dedd0bf301a6a265b0850f (patch)
tree38341f1e990ea51bf52fa2f3474cdc7757fefd0f
parent022553e875094565417d32b82975f56be8384820 (diff)
parentdf9b9567518f2840d79a4a96b447ebe1aa326408 (diff)
downloadffmpeg-fc1152de410323cf41dedd0bf301a6a265b0850f.tar.gz
Merge commit 'df9b9567518f2840d79a4a96b447ebe1aa326408'
* commit 'df9b9567518f2840d79a4a96b447ebe1aa326408': lavc: fix decode_frame() third parameter semantics for video decoders Conflicts: libavcodec/cscd.c libavcodec/eamad.c libavcodec/ffv1dec.c libavcodec/gifdec.c libavcodec/h264.c libavcodec/iff.c libavcodec/mjpegdec.c libavcodec/pcx.c libavcodec/vp56.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/4xm.c4
-rw-r--r--libavcodec/8bps.c4
-rw-r--r--libavcodec/aasc.c4
-rw-r--r--libavcodec/anm.c4
-rw-r--r--libavcodec/ansi.c4
-rw-r--r--libavcodec/asvdec.c4
-rw-r--r--libavcodec/aura.c4
-rw-r--r--libavcodec/avs.c4
-rw-r--r--libavcodec/bethsoftvideo.c6
-rw-r--r--libavcodec/bfi.c4
-rw-r--r--libavcodec/bink.c4
-rw-r--r--libavcodec/bmp.c4
-rw-r--r--libavcodec/bmv.c5
-rw-r--r--libavcodec/c93.c4
-rw-r--r--libavcodec/cavsdec.c10
-rw-r--r--libavcodec/cdgraphics.c6
-rw-r--r--libavcodec/cdxl.c4
-rw-r--r--libavcodec/cinepak.c4
-rw-r--r--libavcodec/cljr.c4
-rw-r--r--libavcodec/cscd.c4
-rw-r--r--libavcodec/cyuv.c4
-rw-r--r--libavcodec/dfa.c4
-rw-r--r--libavcodec/dnxhddec.c4
-rw-r--r--libavcodec/dpx.c4
-rw-r--r--libavcodec/dsicinav.c4
-rw-r--r--libavcodec/dvdec.c4
-rw-r--r--libavcodec/dxa.c4
-rw-r--r--libavcodec/dxtory.c4
-rw-r--r--libavcodec/eacmv.c4
-rw-r--r--libavcodec/eamad.c6
-rw-r--r--libavcodec/eatgq.c4
-rw-r--r--libavcodec/eatgv.c4
-rw-r--r--libavcodec/eatqi.c4
-rw-r--r--libavcodec/escape124.c6
-rw-r--r--libavcodec/ffv1dec.c4
-rw-r--r--libavcodec/flashsv.c4
-rw-r--r--libavcodec/flicvideo.c18
-rw-r--r--libavcodec/fraps.c8
-rw-r--r--libavcodec/frwu.c4
-rw-r--r--libavcodec/gifdec.c8
-rw-r--r--libavcodec/h261dec.c4
-rw-r--r--libavcodec/h263.h2
-rw-r--r--libavcodec/h263dec.c6
-rw-r--r--libavcodec/h264.c10
-rw-r--r--libavcodec/huffyuv.c4
-rw-r--r--libavcodec/idcinvideo.c4
-rw-r--r--libavcodec/iff.c4
-rw-r--r--libavcodec/indeo2.c4
-rw-r--r--libavcodec/indeo3.c6
-rw-r--r--libavcodec/interplayvideo.c4
-rw-r--r--libavcodec/ivi_common.c4
-rw-r--r--libavcodec/ivi_common.h2
-rw-r--r--libavcodec/jvdec.c4
-rw-r--r--libavcodec/kgv1dec.c5
-rw-r--r--libavcodec/kmvc.c5
-rw-r--r--libavcodec/lagarith.c4
-rw-r--r--libavcodec/lcldec.c4
-rw-r--r--libavcodec/libopenjpegdec.c6
-rw-r--r--libavcodec/libschroedingerdec.c8
-rw-r--r--libavcodec/libvpxdec.c4
-rw-r--r--libavcodec/loco.c4
-rw-r--r--libavcodec/mdec.c4
-rw-r--r--libavcodec/mimic.c4
-rw-r--r--libavcodec/mjpegbdec.c4
-rw-r--r--libavcodec/mjpegdec.c4
-rw-r--r--libavcodec/mjpegdec.h2
-rw-r--r--libavcodec/mmvideo.c4
-rw-r--r--libavcodec/motionpixels.c4
-rw-r--r--libavcodec/msrle.c4
-rw-r--r--libavcodec/mss1.c4
-rw-r--r--libavcodec/mss2.c4
-rw-r--r--libavcodec/mss3.c6
-rw-r--r--libavcodec/mss4.c6
-rw-r--r--libavcodec/msvideo1.c4
-rw-r--r--libavcodec/mxpegdec.c6
-rw-r--r--libavcodec/nuv.c4
-rw-r--r--libavcodec/pcx.c4
-rw-r--r--libavcodec/pictordec.c4
-rw-r--r--libavcodec/pngdec.c4
-rw-r--r--libavcodec/pnmdec.c4
-rw-r--r--libavcodec/proresdec_lgpl.c4
-rw-r--r--libavcodec/ptx.c4
-rw-r--r--libavcodec/qdrw.c4
-rw-r--r--libavcodec/qpeg.c4
-rw-r--r--libavcodec/qtrle.c4
-rw-r--r--libavcodec/r210dec.c4
-rw-r--r--libavcodec/rawdec.c4
-rw-r--r--libavcodec/rl2.c4
-rw-r--r--libavcodec/roqvideodec.c4
-rw-r--r--libavcodec/rpza.c4
-rw-r--r--libavcodec/rv10.c4
-rw-r--r--libavcodec/rv34.h2
-rw-r--r--libavcodec/sgidec.c4
-rw-r--r--libavcodec/smacker.c5
-rw-r--r--libavcodec/smc.c4
-rw-r--r--libavcodec/snowdec.c6
-rw-r--r--libavcodec/sp5xdec.c4
-rw-r--r--libavcodec/sunrast.c5
-rw-r--r--libavcodec/svq1dec.c4
-rw-r--r--libavcodec/svq3.c6
-rw-r--r--libavcodec/targa.c4
-rw-r--r--libavcodec/tiertexseqv.c4
-rw-r--r--libavcodec/tiff.c4
-rw-r--r--libavcodec/tmv.c6
-rw-r--r--libavcodec/truemotion1.c4
-rw-r--r--libavcodec/truemotion2.c4
-rw-r--r--libavcodec/tscc.c5
-rw-r--r--libavcodec/tscc2.c6
-rw-r--r--libavcodec/txd.c4
-rw-r--r--libavcodec/ulti.c4
-rw-r--r--libavcodec/utvideodec.c4
-rw-r--r--libavcodec/v210dec.c4
-rw-r--r--libavcodec/v210x.c5
-rw-r--r--libavcodec/v410dec.c4
-rw-r--r--libavcodec/vb.c5
-rw-r--r--libavcodec/vble.c4
-rw-r--r--libavcodec/vc1dec.c8
-rw-r--r--libavcodec/vcr1.c4
-rw-r--r--libavcodec/vmdav.c4
-rw-r--r--libavcodec/vmnc.c5
-rw-r--r--libavcodec/vp3.c4
-rw-r--r--libavcodec/vp56.c4
-rw-r--r--libavcodec/vp56.h2
-rw-r--r--libavcodec/vp8.c4
-rw-r--r--libavcodec/vqavideo.c4
-rw-r--r--libavcodec/wnv1.c4
-rw-r--r--libavcodec/xan.c4
-rw-r--r--libavcodec/xl.c4
-rw-r--r--libavcodec/xwddec.c4
-rw-r--r--libavcodec/xxan.c4
-rw-r--r--libavcodec/yop.c4
-rw-r--r--libavcodec/zerocodec.c4
-rw-r--r--libavcodec/zmbv.c4
133 files changed, 306 insertions, 295 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 3ee41f3907..8fa214f1b4 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -784,7 +784,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;
@@ -919,7 +919,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 d450569bc6..6d56fa67db 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;
@@ -144,7 +144,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 6c9fd4e428..01ec062804 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -75,7 +75,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;
@@ -135,7 +135,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
if (avctx->pix_fmt == AV_PIX_FMT_PAL8)
memcpy(s->frame.data[1], s->palette, s->palette_size);
- *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 7cac095255..c27ab1de1c 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -106,7 +106,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;
@@ -171,7 +171,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 961c57b5f2..8b2ef11921 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -339,7 +339,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;
@@ -442,7 +442,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 127d37a670..8282511239 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -178,7 +178,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;
@@ -244,7 +244,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 39d5235190..e510a9f64c 100644
--- a/libavcodec/aura.c
+++ b/libavcodec/aura.c
@@ -47,7 +47,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;
@@ -109,7 +109,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 4b05bf9400..0881d7417e 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;
@@ -152,7 +152,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 8eec5b7253..04243ed33a 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -65,7 +65,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;
@@ -97,7 +97,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;
@@ -138,7 +138,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 33f9e41952..70291b563b 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -48,7 +48,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;
@@ -169,7 +169,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 6250e267ca..3e2bb71d85 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -1170,7 +1170,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;
@@ -1217,7 +1217,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 3dec91d7cd..406af65ed2 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;
@@ -334,7 +334,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 da9b8aaba6..defa1ab88b 100644
--- a/libavcodec/bmv.c
+++ b/libavcodec/bmv.c
@@ -196,7 +196,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;
@@ -267,7 +268,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 b53ee1b7d6..4ccd767819 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -117,7 +117,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;
@@ -243,7 +243,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 a8a4d6b649..34eeabdae2 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -1112,7 +1112,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;
@@ -1128,7 +1128,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]));
}
@@ -1156,7 +1156,7 @@ 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;
if(!h->top_qp)
@@ -1165,12 +1165,12 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_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 d5ea6e765d..71d9da7ee2 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;
@@ -352,9 +352,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 3a41805d99..3c2afd0232 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -210,7 +210,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;
@@ -283,7 +283,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 9ae63b7432..9c6d290173 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -425,7 +425,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;
@@ -456,7 +456,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 e240026536..b93997f13d 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -48,7 +48,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;
@@ -99,7 +99,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 12dc1e3a09..e7ebb37f58 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -62,7 +62,7 @@ static void add_frame_default(AVFrame *f, const uint8_t *src,
}
}
-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;
@@ -120,7 +120,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 5d49e45f39..3bc6ba4981 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;
@@ -178,7 +178,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 133d7639fb..b324c6e5ba 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -314,7 +314,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;
@@ -369,7 +369,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 50aa303a17..155505fcd9 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -358,7 +358,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;
@@ -404,7 +404,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 c2b307670c..a9a8c16d6c 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -59,7 +59,7 @@ static uint16_t read10in32(const uint8_t **ptr, uint32_t * lbuf,
static int decode_frame(AVCodecContext *avctx,
void *data,
- int *data_size,
+ int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
@@ -263,7 +263,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 dd475896eb..76d4d1fc4d 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -225,7 +225,7 @@ static int 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;
@@ -321,7 +321,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 ac820bd51f..fd00cc18d6 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -312,7 +312,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;
@@ -360,7 +360,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
emms_c();
/* return image */
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->picture;
return s->sys->frame_size;
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index d57398b8fb..ad9ad530f4 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;
@@ -286,7 +286,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 4ee364bab1..30983f8056 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 c537e95be0..a129161386 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -152,7 +152,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;
@@ -202,7 +202,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 25316172a1..7012c4ef12 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -227,7 +227,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;
@@ -240,7 +240,7 @@ static int decode_frame(AVCodecContext *avctx,
if (buf_size < 26) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
- *data_size = 0;
+ *got_frame = 0;
return AVERROR_INVALIDDATA;
}
@@ -288,7 +288,7 @@ static int decode_frame(AVCodecContext *avctx,
if(decode_mb(s, inter) < 0)
return AVERROR_INVALIDDATA;
- *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 fa2ec0f903..c38b3cdf9c 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -189,7 +189,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;
@@ -234,7 +234,7 @@ static int tgq_decode_frame(AVCodecContext *avctx,
if (tgq_decode_mb(s, y, x) < 0)
return AVERROR_INVALIDDATA;
- *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 caee311cda..b105ea539c 100644
--- a/libavcodec/eatgv.c
+++ b/libavcodec/eatgv.c
@@ -253,7 +253,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;
@@ -332,7 +332,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 fcf652b70a..306331f359 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;
@@ -139,7 +139,7 @@ static int tqi_decode_frame(AVCodecContext *avctx,
}
end:
- *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 9198a3414b..1865c3829f 100644
--- a/libavcodec/escape124.c
+++ b/libavcodec/escape124.c
@@ -198,7 +198,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;
@@ -234,7 +234,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;
@@ -360,7 +360,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 7c9bb9cf95..2d03085873 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -727,7 +727,7 @@ 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)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
@@ -843,7 +843,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
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 533e9f0f37..8448a8c285 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -236,7 +236,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;
@@ -443,7 +443,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 7bba2998b1..2a117d6da6 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -148,7 +148,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;
@@ -461,14 +461,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 */
@@ -748,14 +748,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");
@@ -763,22 +763,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 b624e4b305..6500c853e2 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -125,7 +125,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;
@@ -164,7 +164,7 @@ static int decode_frame(AVCodecContext *avctx,
needed_size += header_size;
/* bit 31 means same as previous pic */
if (header & (1U<<31)) {
- *data_size = 0;
+ *got_frame = 0;
return buf_size;
}
if (buf_size != needed_size) {
@@ -176,7 +176,7 @@ static int decode_frame(AVCodecContext *avctx,
} else {
/* skip frame */
if (buf_size == 8) {
- *data_size = 0;
+ *got_frame = 0;
return buf_size;
}
if (AV_RL32(buf) != FPS_TAG || buf_size < planes*1024 + 24) {
@@ -291,7 +291,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 78c6dbd948..43feb012f2 100644
--- a/libavcodec/frwu.c
+++ b/libavcodec/frwu.c
@@ -45,7 +45,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)
{
FRWUContext *s = avctx->priv_data;
@@ -107,7 +107,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 acd9b29146..06b673b66f 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -415,7 +415,7 @@ static int gif_read_header1(GifState *s)
static int gif_parse_next_image(GifState *s, int *got_picture)
{
int ret;
- *got_picture = sizeof(AVPicture);
+ *got_picture = 1;
while (s->bytestream < s->bytestream_end) {
int code = bytestream_get_byte(&s->bytestream);
@@ -454,7 +454,7 @@ static av_cold int gif_decode_init(AVCodecContext *avctx)
return 0;
}
-static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_picture, 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;
@@ -505,10 +505,10 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_picture,
s->picture.key_frame = 0;
}
- ret = gif_parse_next_image(s, got_picture);
+ ret = gif_parse_next_image(s, got_frame);
if (ret < 0)
return ret;
- else if (*got_picture)
+ else if (*got_frame)
*picture = s->picture;
return s->bytestream - buf;
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 9bd6b20bba..7cca7bb82e 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -551,7 +551,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;
@@ -636,7 +636,7 @@ retry:
*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 a8d266d1f6..34d79a088d 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 c897bc31c6..d457466006 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -346,7 +346,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;
@@ -368,7 +368,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;
@@ -753,7 +753,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 e6730757b3..618acb74b2 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4099,7 +4099,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;
@@ -4136,7 +4136,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
h->delayed_pic[i] = h->delayed_pic[i + 1];
if (out) {
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*pict = out->f;
}
@@ -4190,14 +4190,14 @@ not_extra:
field_end(h, 0);
/* Wait for second field. */
- *data_size = 0;
+ *got_frame = 0;
if (h->next_output_pic && (h->next_output_pic->sync || h->sync>1)) {
- *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 ca5bcd8588..6598144aeb 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -977,7 +977,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;
@@ -1230,7 +1230,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 6e7bcb2484..064e55f867 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -213,7 +213,7 @@ static int 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;
@@ -243,7 +243,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 1f07492c22..0e4c172c79 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -591,7 +591,7 @@ static int unsupported(AVCodecContext *avctx)
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
IffContext *s = avctx->priv_data;
@@ -784,7 +784,7 @@ static int decode_frame(AVCodecContext *avctx,
return unsupported(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 74a9800e2b..fcd0ae46d4 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;
@@ -191,7 +191,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 c15463ddbb..a8206dbb00 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -1054,7 +1054,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;
@@ -1069,7 +1069,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;
}
@@ -1115,7 +1115,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 82bcf85065..f1a2a3856a 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -957,7 +957,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;
@@ -992,7 +992,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 c2815da82e..53501b5c25 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -778,7 +778,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;
@@ -862,7 +862,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 e3afe435e0..65dcfd802e 100644
--- a/libavcodec/ivi_common.h
+++ b/libavcodec/ivi_common.h
@@ -389,7 +389,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 5e54a1607f..53d8285788 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;
@@ -190,7 +190,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 66829bfae6..0199636822 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 ebaaa84d94..edfafa0401 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -259,7 +259,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;
@@ -361,7 +362,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 d0a5049542..3a1791785f 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -507,7 +507,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;
unsigned int buf_size = avpkt->size;
@@ -676,7 +676,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 24274a7930..9b5e16decc 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -164,7 +164,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;
@@ -469,7 +469,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 5f3c36bbe5..826a16fb84 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -230,7 +230,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;
@@ -246,7 +246,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) &&
@@ -381,7 +381,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 c98b4991ae..bce0271850 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
@@ -203,7 +203,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;
@@ -221,7 +221,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) {
@@ -337,14 +337,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 61dbaa7998..809266a982 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 2aac453cb3..14b2fe93b8 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -161,7 +161,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;
@@ -231,7 +231,7 @@ static int decode_frame(AVCodecContext *avctx,
}
stop:
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = l->pic;
return buf_size < 0 ? -1 : avpkt->size - buf_size;
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 52b9040a39..364e999513 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 25db9ca1ae..880bbc0ddd 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;
@@ -389,7 +389,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 796ef84260..52842332c2 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;
@@ -142,7 +142,7 @@ read_header:
}
*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 e1ff53ba72..b0dd85e33d 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1598,7 +1598,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;
@@ -1712,7 +1712,7 @@ eoi_parser:
break;
}
*picture = *s->picture_ptr;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
s->got_picture = 0;
if (!s->lossless) {
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index f35f20ac11..6c6195b3d3 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -119,7 +119,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 0120e9f63a..c61cd576e4 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -173,7 +173,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;
@@ -210,7 +210,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 avpkt->size;
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 8d457e0370..61a718c5a9 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -245,7 +245,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;
@@ -303,7 +303,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 2792f8b004..a1ef037e49 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -81,7 +81,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;
@@ -136,7 +136,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 6a55b4fbfe..446339b094 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 c3c4b35ab2..32a5032372 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 91aceb2758..545fefc47a 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 51db721432..f575387e6e 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 8d1164bf8f..fd98b31327 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -287,7 +287,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;
@@ -318,7 +318,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 1e7b59397f..59d41b6abe 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -157,7 +157,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;
@@ -294,7 +294,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];
@@ -303,7 +303,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 09868e8907..67c9c0f9fb 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -143,7 +143,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height,
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)
{
const uint8_t *buf = avpkt->data;
@@ -283,7 +283,7 @@ retry:
}
*picture = c->pic;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
return orig_size;
}
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index 7f24756047..bac818c586 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -75,7 +75,7 @@ static void pcx_palette(GetByteContext *gb, uint32_t *dst, 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)
{
PCXContext * const s = avctx->priv_data;
@@ -240,7 +240,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
*picture = s->picture;
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
end:
av_free(scanline);
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 64dd8159c9..b7d7bf0cd4 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -106,7 +106,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
PicContext *s = avctx->priv_data;
@@ -258,7 +258,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
- *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 06fd133c61..eb6e1a6713 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -505,7 +505,7 @@ static int decode_text_chunk(PNGDecContext *s, uint32_t length, int compressed,
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
@@ -845,7 +845,7 @@ static int decode_frame(AVCodecContext *avctx,
s->current_picture->metadata = metadata;
metadata = NULL;
*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 0c0973899c..fd17fe3499 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -26,7 +26,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;
@@ -186,7 +186,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_lgpl.c b/libavcodec/proresdec_lgpl.c
index ce2396960d..4fa2817e86 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.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 edb5936fe2..91231a8baa 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;
@@ -93,7 +93,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 227ae1536c..2be6e04b64 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 565f6ad6c3..105ac69600 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -250,7 +250,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];
@@ -296,7 +296,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 d02dffae6a..41fda4b3b6 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -400,7 +400,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;
@@ -498,7 +498,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 902f92fbf3..d51a55719b 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -37,7 +37,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;
@@ -90,7 +90,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 f60f5e4465..5002ccc1fc 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -149,7 +149,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;
@@ -267,7 +267,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 2e2d946fa2..642d31af32 100644
--- a/libavcodec/rl2.c
+++ b/libavcodec/rl2.c
@@ -173,7 +173,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;
@@ -197,7 +197,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 3a8e904c33..c90939df04 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -188,7 +188,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;
@@ -210,7 +210,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 498c36e7b8..a424759953 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -245,7 +245,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;
@@ -264,7 +264,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 d06a2fe1b2..db39f4627b 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -670,7 +670,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;
@@ -737,7 +737,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 6b8d36556f..bb18b45d22 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 7ea9b6d69a..555b5044af 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -152,7 +152,7 @@ static int read_uncompressed_sgi(unsigned char* out_buf, SgiState *s)
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
SgiState *s = avctx->priv_data;
@@ -234,7 +234,7 @@ static int decode_frame(AVCodecContext *avctx,
if (ret == 0) {
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return avpkt->size;
} else {
return ret;
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 939bac49c0..1a73dcce0d 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -365,7 +365,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;
@@ -512,7 +513,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 402c8040f0..6294f09691 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -423,7 +423,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;
@@ -448,7 +448,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 abb6a82f21..c4baf0a7d1 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -391,7 +391,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;
@@ -553,7 +555,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 7216088e7f..b083015f00 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 f85bb96844..bfdf2b7e2a 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;
@@ -222,7 +223,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 27e9606f88..efe23f1e35 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -583,7 +583,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;
@@ -707,7 +707,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 e19542252c..c50efbc70f 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1008,7 +1008,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)
{
SVQ3Context *svq3 = avctx->priv_data;
H264Context *h = &svq3->h;
@@ -1022,7 +1022,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;
}
@@ -1167,7 +1167,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 5c0efb3f40..6bb05a93ad 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -108,7 +108,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;
@@ -298,7 +298,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 62b7eeb25d..3ae7c88174 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -223,7 +223,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;
@@ -241,7 +241,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 f7a1e75209..64e4e41ca3 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -984,7 +984,7 @@ static int tiff_decode_tag(TiffContext *s)
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size, AVPacket *avpkt)
+ void *data, int *got_frame, AVPacket *avpkt)
{
TiffContext *const s = avctx->priv_data;
AVFrame *picture = data;
@@ -1151,7 +1151,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
*picture = s->picture;
- *data_size = sizeof(AVPicture);
+ *got_frame = 1;
return avpkt->size;
}
diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c
index 63ec830f6d..2179dfbd6f 100644
--- a/libavcodec/tmv.c
+++ b/libavcodec/tmv.c
@@ -40,7 +40,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;
@@ -60,7 +60,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;
}
@@ -82,7 +82,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 b46366b837..6378d6388d 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -856,7 +856,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;
@@ -883,7 +883,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 f1e24b729c..20322435c5 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -826,7 +826,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;
@@ -873,7 +873,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;
return buf_size;
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index aaf2127c11..2aca0ba3b0 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;
@@ -121,7 +122,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 8692819942..b71e7fa25b 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 29de782cce..2dd82598a4 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;
@@ -143,7 +143,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 f6d6418961..a9413ad728 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -210,7 +210,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;
@@ -407,7 +407,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 cfeb46bbb0..259030aac5 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;
@@ -463,7 +463,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 b0754767a9..63037adb8d 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -72,7 +72,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)
{
V210DecContext *s = avctx->priv_data;
@@ -154,7 +154,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 900281a0c4..f973124122 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -40,7 +40,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;
@@ -121,7 +122,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 52cdf3218d..ff2381741a 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 79f3cae64a..11225869f1 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;
@@ -239,7 +240,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 22e92a45bb..c8037bdb80 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -111,7 +111,7 @@ static void vble_restore_plane(VBLEContext *ctx, GetBitContext *gb, int plane,
}
}
-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;
@@ -169,7 +169,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
vble_restore_plane(ctx, &gb, 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 0946db5334..690cb39a3d 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5335,7 +5335,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;
@@ -5363,7 +5363,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 buf_size;
@@ -5745,7 +5745,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;
@@ -5753,7 +5753,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 6486e63a0d..778ad0d8c2 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -69,7 +69,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;
@@ -143,7 +143,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 3278c6fdcc..6da60c14a1 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -412,7 +412,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;
@@ -441,7 +441,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 d465f305cc..eb39fc923d 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;
@@ -454,7 +455,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 7e129f668d..34061016a9 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1903,7 +1903,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;
@@ -2040,7 +2040,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 1a7c36ef13..adde128a62 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -492,7 +492,7 @@ static int vp56_size_changed(VP56Context *s)
static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *, int, int);
-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;
@@ -586,7 +586,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 65245a2246..838ce48c3d 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -183,7 +183,7 @@ void ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s,
int ff_vp56_free(AVCodecContext *avctx);
int ff_vp56_free_context(VP56Context *s);
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 9424c458af..227ae6a8ab 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1856,7 +1856,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;
@@ -2005,7 +2005,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 e1afca3c2d..19b8639c59 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -583,7 +583,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;
@@ -605,7 +605,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 a99796632d..5dffde1fec 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;
@@ -129,7 +129,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 da6627c065..2aa420e508 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -512,7 +512,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;
@@ -605,7 +605,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 3103ff463b..df354893a5 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -42,7 +42,7 @@ static const int xl_table[32] = {
};
static int 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 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 2f8453734e..9923cdc343 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;
@@ -245,7 +245,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 47b3544b05..ed1821772f 100644
--- a/libavcodec/xxan.c
+++ b/libavcodec/xxan.c
@@ -369,7 +369,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;
@@ -401,7 +401,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 856d6f4e26..16a2db13e4 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -192,7 +192,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;
@@ -259,7 +259,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 e5edb5f0ed..f54abb1c1b 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 6d25056c85..167f6f8826 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;
@@ -601,7 +601,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 */