static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, int for_user)

{

    int err = 0;



    if (dst != src) {

        dst->sub_id    = src->sub_id;

        dst->time_base = src->time_base;

        dst->width     = src->width;

        dst->height    = src->height;

        dst->pix_fmt   = src->pix_fmt;



        dst->coded_width  = src->coded_width;

        dst->coded_height = src->coded_height;



        dst->has_b_frames = src->has_b_frames;

        dst->idct_algo    = src->idct_algo;

        dst->slice_count  = src->slice_count;



        dst->bits_per_coded_sample = src->bits_per_coded_sample;

        dst->sample_aspect_ratio   = src->sample_aspect_ratio;

        dst->dtg_active_format     = src->dtg_active_format;



        dst->profile = src->profile;

        dst->level   = src->level;



        dst->bits_per_raw_sample = src->bits_per_raw_sample;

        dst->ticks_per_frame     = src->ticks_per_frame;

        dst->color_primaries     = src->color_primaries;



        dst->color_trc   = src->color_trc;

        dst->colorspace  = src->colorspace;

        dst->color_range = src->color_range;

        dst->chroma_sample_location = src->chroma_sample_location;

    }



    if (for_user) {

        dst->coded_frame   = src->coded_frame;

        dst->has_b_frames += src->thread_count - 1;

    } else {

        if (dst->codec->update_thread_context)

            err = dst->codec->update_thread_context(dst, src);

    }



    return err;

}

static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, int for_user)

{

    int err = 0;



    if (dst != src) {

        dst->sub_id    = src->sub_id;

        dst->time_base = src->time_base;

        dst->width     = src->width;

        dst->height    = src->height;

        dst->pix_fmt   = src->pix_fmt;



        dst->coded_width  = src->coded_width;

        dst->coded_height = src->coded_height;



        dst->has_b_frames = src->has_b_frames;

        dst->idct_algo    = src->idct_algo;

        dst->slice_count  = src->slice_count;



        dst->bits_per_coded_sample = src->bits_per_coded_sample;

        dst->sample_aspect_ratio   = src->sample_aspect_ratio;

        dst->dtg_active_format     = src->dtg_active_format;



        dst->profile = src->profile;

        dst->level   = src->level;



        dst->bits_per_raw_sample = src->bits_per_raw_sample;

        dst->ticks_per_frame     = src->ticks_per_frame;

        dst->color_primaries     = src->color_primaries;



        dst->color_trc   = src->color_trc;

        dst->colorspace  = src->colorspace;

        dst->color_range = src->color_range;

        dst->chroma_sample_location = src->chroma_sample_location;

    }



    if (for_user) {

        dst->coded_frame   = src->coded_frame;

        dst->has_b_frames += src->thread_count - 1;

    } else {

        if (dst->codec->update_thread_context)

            err = dst->codec->update_thread_context(dst, src);

    }



    return err;

}

        dst->has_b_frames += src->thread_count - 1;
static int FUNC_0(AVCodecContext *VAR_0, AVCodecContext *VAR_1, int VAR_2)

{

    int VAR_3 = 0;



    if (VAR_0 != VAR_1) {

        VAR_0->sub_id    = VAR_1->sub_id;

        VAR_0->time_base = VAR_1->time_base;

        VAR_0->width     = VAR_1->width;

        VAR_0->height    = VAR_1->height;

        VAR_0->pix_fmt   = VAR_1->pix_fmt;



        VAR_0->coded_width  = VAR_1->coded_width;

        VAR_0->coded_height = VAR_1->coded_height;



        VAR_0->has_b_frames = VAR_1->has_b_frames;

        VAR_0->idct_algo    = VAR_1->idct_algo;

        VAR_0->slice_count  = VAR_1->slice_count;



        VAR_0->bits_per_coded_sample = VAR_1->bits_per_coded_sample;

        VAR_0->sample_aspect_ratio   = VAR_1->sample_aspect_ratio;

        VAR_0->dtg_active_format     = VAR_1->dtg_active_format;



        VAR_0->profile = VAR_1->profile;

        VAR_0->level   = VAR_1->level;



        VAR_0->bits_per_raw_sample = VAR_1->bits_per_raw_sample;

        VAR_0->ticks_per_frame     = VAR_1->ticks_per_frame;

        VAR_0->color_primaries     = VAR_1->color_primaries;



        VAR_0->color_trc   = VAR_1->color_trc;

        VAR_0->colorspace  = VAR_1->colorspace;

        VAR_0->color_range = VAR_1->color_range;

        VAR_0->chroma_sample_location = VAR_1->chroma_sample_location;

    }



    if (VAR_2) {

        VAR_0->coded_frame   = VAR_1->coded_frame;

        VAR_0->has_b_frames += VAR_1->thread_count - 1;

    } else {

        if (VAR_0->codec->update_thread_context)

            VAR_3 = VAR_0->codec->update_thread_context(VAR_0, VAR_1);

    }



    return VAR_3;

}

static int FUNC_0(AVCodecContext *VAR_0, AVCodecContext *VAR_1, int VAR_2)
{ int VAR_3 = 0; if (VAR_0 != VAR_1) { VAR_0->sub_id    = VAR_1->sub_id; VAR_0->time_base = VAR_1->time_base; VAR_0->width     = VAR_1->width; VAR_0->height    = VAR_1->height; VAR_0->pix_fmt   = VAR_1->pix_fmt; VAR_0->coded_width  = VAR_1->coded_width; VAR_0->coded_height = VAR_1->coded_height; VAR_0->has_b_frames = VAR_1->has_b_frames; VAR_0->idct_algo    = VAR_1->idct_algo; VAR_0->slice_count  = VAR_1->slice_count; VAR_0->bits_per_coded_sample = VAR_1->bits_per_coded_sample; VAR_0->sample_aspect_ratio   = VAR_1->sample_aspect_ratio; VAR_0->dtg_active_format     = VAR_1->dtg_active_format; VAR_0->profile = VAR_1->profile; VAR_0->level   = VAR_1->level; VAR_0->bits_per_raw_sample = VAR_1->bits_per_raw_sample; VAR_0->ticks_per_frame     = VAR_1->ticks_per_frame; VAR_0->color_primaries     = VAR_1->color_primaries; VAR_0->color_trc   = VAR_1->color_trc; VAR_0->colorspace  = VAR_1->colorspace; VAR_0->color_range = VAR_1->color_range; VAR_0->chroma_sample_location = VAR_1->chroma_sample_location; } if (VAR_2) { VAR_0->coded_frame   = VAR_1->coded_frame; VAR_0->has_b_frames += VAR_1->thread_count - 1; } else { if (VAR_0->codec->update_thread_context)
VAR_3 = VAR_0->codec->update_thread_context(VAR_0, VAR_1); } return VAR_3; }