static int mimic_decode_update_thread_context(AVCodecContext *avctx, const AVCodecContext *avctx_from)

{

    MimicContext *dst = avctx->priv_data, *src = avctx_from->priv_data;

    int i, ret;



    if (avctx == avctx_from)

        return 0;



    dst->cur_index  = src->next_cur_index;

    dst->prev_index = src->next_prev_index;



    memcpy(dst->flipped_ptrs, src->flipped_ptrs, sizeof(src->flipped_ptrs));



    for (i = 0; i < FF_ARRAY_ELEMS(dst->frames); i++) {

        ff_thread_release_buffer(avctx, &dst->frames[i]);

        if (src->frames[i].f->data[0]) {

            ret = ff_thread_ref_frame(&dst->frames[i], &src->frames[i]);

            if (ret < 0)

                return ret;

        }

    }



    return 0;

}

static int mimic_decode_update_thread_context(AVCodecContext *avctx, const AVCodecContext *avctx_from)

{

    MimicContext *dst = avctx->priv_data, *src = avctx_from->priv_data;

    int i, ret;



    if (avctx == avctx_from)

        return 0;



    dst->cur_index  = src->next_cur_index;

    dst->prev_index = src->next_prev_index;



    memcpy(dst->flipped_ptrs, src->flipped_ptrs, sizeof(src->flipped_ptrs));



    for (i = 0; i < FF_ARRAY_ELEMS(dst->frames); i++) {

        ff_thread_release_buffer(avctx, &dst->frames[i]);

        if (src->frames[i].f->data[0]) {

            ret = ff_thread_ref_frame(&dst->frames[i], &src->frames[i]);

            if (ret < 0)

                return ret;

        }

    }



    return 0;

}

        if (src->frames[i].f->data[0]) {
static int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1)

{

    MimicContext *dst = VAR_0->priv_data, *src = VAR_1->priv_data;

    int VAR_2, VAR_3;



    if (VAR_0 == VAR_1)

        return 0;



    dst->cur_index  = src->next_cur_index;

    dst->prev_index = src->next_prev_index;



    memcpy(dst->flipped_ptrs, src->flipped_ptrs, sizeof(src->flipped_ptrs));



    for (VAR_2 = 0; VAR_2 < FF_ARRAY_ELEMS(dst->frames); VAR_2++) {

        ff_thread_release_buffer(VAR_0, &dst->frames[VAR_2]);

        if (src->frames[VAR_2].f->data[0]) {

            VAR_3 = ff_thread_ref_frame(&dst->frames[VAR_2], &src->frames[VAR_2]);

            if (VAR_3 < 0)

                return VAR_3;

        }

    }



    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1)
{ MimicContext *dst = VAR_0->priv_data, *src = VAR_1->priv_data; int VAR_2, VAR_3; if (VAR_0 == VAR_1)
return 0; dst->cur_index  = src->next_cur_index; dst->prev_index = src->next_prev_index; memcpy(dst->flipped_ptrs, src->flipped_ptrs, sizeof(src->flipped_ptrs)); for (VAR_2 = 0; VAR_2 < FF_ARRAY_ELEMS(dst->frames); VAR_2++) { ff_thread_release_buffer(VAR_0, &dst->frames[VAR_2]); if (src->frames[VAR_2].f->data[0]) { VAR_3 = ff_thread_ref_frame(&dst->frames[VAR_2], &src->frames[VAR_2]); if (VAR_3 < 0)
return VAR_3; } } return 0; }