static int finish_frame(AVCodecContext *avctx, AVFrame *pict)

{

    RV34DecContext *r = avctx->priv_data;

    MpegEncContext *s = &r->s;

    int got_picture = 0, ret;



    ff_er_frame_end(&s->er);

    ff_mpv_frame_end(s);

    s->mb_num_left = 0;



    if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))

        ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);



    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {

        if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)

            return ret;

        ff_print_debug_info(s, s->current_picture_ptr);

        got_picture = 1;

    } else if (s->last_picture_ptr != NULL) {

        if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)

            return ret;

        ff_print_debug_info(s, s->last_picture_ptr);

        got_picture = 1;

    }



    return got_picture;

}

static int finish_frame(AVCodecContext *avctx, AVFrame *pict)

{

    RV34DecContext *r = avctx->priv_data;

    MpegEncContext *s = &r->s;

    int got_picture = 0, ret;



    ff_er_frame_end(&s->er);

    ff_mpv_frame_end(s);

    s->mb_num_left = 0;



    if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))

        ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);



    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {

        if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)

            return ret;

        ff_print_debug_info(s, s->current_picture_ptr);

        got_picture = 1;

    } else if (s->last_picture_ptr != NULL) {

        if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)

            return ret;

        ff_print_debug_info(s, s->last_picture_ptr);

        got_picture = 1;

    }



    return got_picture;

}

static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)

{

    RV34DecContext *r = VAR_0->priv_data;

    MpegEncContext *s = &r->s;

    int VAR_2 = 0, VAR_3;



    ff_er_frame_end(&s->er);

    ff_mpv_frame_end(s);

    s->mb_num_left = 0;



    if (HAVE_THREADS && (s->VAR_0->active_thread_type & FF_THREAD_FRAME))

        ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);



    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {

        if ((VAR_3 = av_frame_ref(VAR_1, s->current_picture_ptr->f)) < 0)

            return VAR_3;

        ff_print_debug_info(s, s->current_picture_ptr);

        VAR_2 = 1;

    } else if (s->last_picture_ptr != NULL) {

        if ((VAR_3 = av_frame_ref(VAR_1, s->last_picture_ptr->f)) < 0)

            return VAR_3;

        ff_print_debug_info(s, s->last_picture_ptr);

        VAR_2 = 1;

    }



    return VAR_2;

}

static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)
{ RV34DecContext *r = VAR_0->priv_data; MpegEncContext *s = &r->s; int VAR_2 = 0, VAR_3; ff_er_frame_end(&s->er); ff_mpv_frame_end(s); s->mb_num_left = 0; if (HAVE_THREADS && (s->VAR_0->active_thread_type & FF_THREAD_FRAME))
ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { if ((VAR_3 = av_frame_ref(VAR_1, s->current_picture_ptr->f)) < 0)
return VAR_3; ff_print_debug_info(s, s->current_picture_ptr); VAR_2 = 1; } else if (s->last_picture_ptr != NULL) { if ((VAR_3 = av_frame_ref(VAR_1, s->last_picture_ptr->f)) < 0)
return VAR_3; ff_print_debug_info(s, s->last_picture_ptr); VAR_2 = 1; } return VAR_2; }