static int rpza_decode_frame(AVCodecContext *avctx,

                             void *data, int *got_frame,

                             AVPacket *avpkt)

{

    RpzaContext *s = avctx->priv_data;

    int ret;



    bytestream2_init(&s->gb, avpkt->data, avpkt->size);



    if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) {

        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");

        return ret;

    }



    rpza_decode_stream(s);



    if ((ret = av_frame_ref(data, s->frame)) < 0)

        return ret;



    *got_frame      = 1;



    /* always report that the buffer was completely consumed */

    return avpkt->size;

}

static int rpza_decode_frame(AVCodecContext *avctx,

                             void *data, int *got_frame,

                             AVPacket *avpkt)

{

    RpzaContext *s = avctx->priv_data;

    int ret;



    bytestream2_init(&s->gb, avpkt->data, avpkt->size);



    if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) {

        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");

        return ret;

    }



    rpza_decode_stream(s);



    if ((ret = av_frame_ref(data, s->frame)) < 0)

        return ret;



    *got_frame      = 1;



    

    return avpkt->size;

}

static int FUNC_0(AVCodecContext *VAR_0,

                             void *VAR_1, int *VAR_2,

                             AVPacket *VAR_3)

{

    RpzaContext *s = VAR_0->priv_data;

    int VAR_4;



    bytestream2_init(&s->gb, VAR_3->VAR_1, VAR_3->size);



    if ((VAR_4 = ff_reget_buffer(VAR_0, s->frame)) < 0) {

        av_log(VAR_0, AV_LOG_ERROR, "reget_buffer() failed\n");

        return VAR_4;

    }



    rpza_decode_stream(s);



    if ((VAR_4 = av_frame_ref(VAR_1, s->frame)) < 0)

        return VAR_4;



    *VAR_2      = 1;



    

    return VAR_3->size;

}

static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{ RpzaContext *s = VAR_0->priv_data; int VAR_4; bytestream2_init(&s->gb, VAR_3->VAR_1, VAR_3->size); if ((VAR_4 = ff_reget_buffer(VAR_0, s->frame)) < 0) { av_log(VAR_0, AV_LOG_ERROR, "reget_buffer() failed\n"); return VAR_4; } rpza_decode_stream(s); if ((VAR_4 = av_frame_ref(VAR_1, s->frame)) < 0)
return VAR_4; *VAR_2      = 1; return VAR_3->size; }