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>
This commit is contained in:
		@@ -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();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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')
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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])
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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]);
 | 
			
		||||
 
 | 
			
		||||
@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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...)
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user