static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)

{

    int i;



    dst->key_frame              = src->key_frame;

    dst->pict_type              = src->pict_type;

    dst->sample_aspect_ratio    = src->sample_aspect_ratio;

    dst->pts                    = src->pts;

    dst->repeat_pict            = src->repeat_pict;

    dst->interlaced_frame       = src->interlaced_frame;

    dst->top_field_first        = src->top_field_first;

    dst->palette_has_changed    = src->palette_has_changed;

    dst->sample_rate            = src->sample_rate;

    dst->opaque                 = src->opaque;

#if FF_API_PKT_PTS

FF_DISABLE_DEPRECATION_WARNINGS

    dst->pkt_pts                = src->pkt_pts;

FF_ENABLE_DEPRECATION_WARNINGS

#endif

    dst->pkt_dts                = src->pkt_dts;

    dst->pkt_pos                = src->pkt_pos;

    dst->pkt_size               = src->pkt_size;

    dst->pkt_duration           = src->pkt_duration;

    dst->reordered_opaque       = src->reordered_opaque;

    dst->quality                = src->quality;

    dst->best_effort_timestamp  = src->best_effort_timestamp;

    dst->coded_picture_number   = src->coded_picture_number;

    dst->display_picture_number = src->display_picture_number;

    dst->flags                  = src->flags;

    dst->decode_error_flags     = src->decode_error_flags;

    dst->color_primaries        = src->color_primaries;

    dst->color_trc              = src->color_trc;

    dst->colorspace             = src->colorspace;

    dst->color_range            = src->color_range;

    dst->chroma_location        = src->chroma_location;



    av_dict_copy(&dst->metadata, src->metadata, 0);



#if FF_API_ERROR_FRAME

FF_DISABLE_DEPRECATION_WARNINGS

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

FF_ENABLE_DEPRECATION_WARNINGS

#endif



    for (i = 0; i < src->nb_side_data; i++) {

        const AVFrameSideData *sd_src = src->side_data[i];

        AVFrameSideData *sd_dst;

        if (   sd_src->type == AV_FRAME_DATA_PANSCAN

            && (src->width != dst->width || src->height != dst->height))

            continue;

        if (force_copy) {

            sd_dst = av_frame_new_side_data(dst, sd_src->type,

                                            sd_src->size);

            if (!sd_dst) {

                wipe_side_data(dst);

                return AVERROR(ENOMEM);


            memcpy(sd_dst->data, sd_src->data, sd_src->size);

        } else {

            sd_dst = av_frame_new_side_data(dst, sd_src->type, 0);

            if (!sd_dst) {

                wipe_side_data(dst);

                return AVERROR(ENOMEM);


            if (sd_src->buf) {

            sd_dst->buf = av_buffer_ref(sd_src->buf);

            if (!sd_dst->buf) {

                wipe_side_data(dst);

                return AVERROR(ENOMEM);


            sd_dst->data = sd_dst->buf->data;

            sd_dst->size = sd_dst->buf->size;



        av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0);




#if FF_API_FRAME_QP

FF_DISABLE_DEPRECATION_WARNINGS

    dst->qscale_table = NULL;

    dst->qstride      = 0;

    dst->qscale_type  = 0;

    av_buffer_unref(&dst->qp_table_buf);

    if (src->qp_table_buf) {

        dst->qp_table_buf = av_buffer_ref(src->qp_table_buf);

        if (dst->qp_table_buf) {

            dst->qscale_table = dst->qp_table_buf->data;

            dst->qstride      = src->qstride;

            dst->qscale_type  = src->qscale_type;



FF_ENABLE_DEPRECATION_WARNINGS

#endif



    return 0;

static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)

{

    int i;



    dst->key_frame              = src->key_frame;

    dst->pict_type              = src->pict_type;

    dst->sample_aspect_ratio    = src->sample_aspect_ratio;

    dst->pts                    = src->pts;

    dst->repeat_pict            = src->repeat_pict;

    dst->interlaced_frame       = src->interlaced_frame;

    dst->top_field_first        = src->top_field_first;

    dst->palette_has_changed    = src->palette_has_changed;

    dst->sample_rate            = src->sample_rate;

    dst->opaque                 = src->opaque;

#if FF_API_PKT_PTS

FF_DISABLE_DEPRECATION_WARNINGS

    dst->pkt_pts                = src->pkt_pts;

FF_ENABLE_DEPRECATION_WARNINGS

#endif

    dst->pkt_dts                = src->pkt_dts;

    dst->pkt_pos                = src->pkt_pos;

    dst->pkt_size               = src->pkt_size;

    dst->pkt_duration           = src->pkt_duration;

    dst->reordered_opaque       = src->reordered_opaque;

    dst->quality                = src->quality;

    dst->best_effort_timestamp  = src->best_effort_timestamp;

    dst->coded_picture_number   = src->coded_picture_number;

    dst->display_picture_number = src->display_picture_number;

    dst->flags                  = src->flags;

    dst->decode_error_flags     = src->decode_error_flags;

    dst->color_primaries        = src->color_primaries;

    dst->color_trc              = src->color_trc;

    dst->colorspace             = src->colorspace;

    dst->color_range            = src->color_range;

    dst->chroma_location        = src->chroma_location;



    av_dict_copy(&dst->metadata, src->metadata, 0);



#if FF_API_ERROR_FRAME

FF_DISABLE_DEPRECATION_WARNINGS

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

FF_ENABLE_DEPRECATION_WARNINGS

#endif



    for (i = 0; i < src->nb_side_data; i++) {

        const AVFrameSideData *sd_src = src->side_data[i];

        AVFrameSideData *sd_dst;

        if (   sd_src->type == AV_FRAME_DATA_PANSCAN

            && (src->width != dst->width || src->height != dst->height))

            continue;

        if (force_copy) {

            sd_dst = av_frame_new_side_data(dst, sd_src->type,

                                            sd_src->size);

            if (!sd_dst) {

                wipe_side_data(dst);

                return AVERROR(ENOMEM);


            memcpy(sd_dst->data, sd_src->data, sd_src->size);

        } else {

            sd_dst = av_frame_new_side_data(dst, sd_src->type, 0);

            if (!sd_dst) {

                wipe_side_data(dst);

                return AVERROR(ENOMEM);


            if (sd_src->buf) {

            sd_dst->buf = av_buffer_ref(sd_src->buf);

            if (!sd_dst->buf) {

                wipe_side_data(dst);

                return AVERROR(ENOMEM);


            sd_dst->data = sd_dst->buf->data;

            sd_dst->size = sd_dst->buf->size;



        av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0);




#if FF_API_FRAME_QP

FF_DISABLE_DEPRECATION_WARNINGS

    dst->qscale_table = NULL;

    dst->qstride      = 0;

    dst->qscale_type  = 0;

    av_buffer_unref(&dst->qp_table_buf);

    if (src->qp_table_buf) {

        dst->qp_table_buf = av_buffer_ref(src->qp_table_buf);

        if (dst->qp_table_buf) {

            dst->qscale_table = dst->qp_table_buf->data;

            dst->qstride      = src->qstride;

            dst->qscale_type  = src->qscale_type;



FF_ENABLE_DEPRECATION_WARNINGS

#endif



    return 0;

static int FUNC_0(AVFrame *VAR_0, const AVFrame *VAR_1, int VAR_2)

{

    int VAR_3;



    VAR_0->key_frame              = VAR_1->key_frame;

    VAR_0->pict_type              = VAR_1->pict_type;

    VAR_0->sample_aspect_ratio    = VAR_1->sample_aspect_ratio;

    VAR_0->pts                    = VAR_1->pts;

    VAR_0->repeat_pict            = VAR_1->repeat_pict;

    VAR_0->interlaced_frame       = VAR_1->interlaced_frame;

    VAR_0->top_field_first        = VAR_1->top_field_first;

    VAR_0->palette_has_changed    = VAR_1->palette_has_changed;

    VAR_0->sample_rate            = VAR_1->sample_rate;

    VAR_0->opaque                 = VAR_1->opaque;

#if FF_API_PKT_PTS

FF_DISABLE_DEPRECATION_WARNINGS

    VAR_0->pkt_pts                = VAR_1->pkt_pts;

FF_ENABLE_DEPRECATION_WARNINGS

#endif

    VAR_0->pkt_dts                = VAR_1->pkt_dts;

    VAR_0->pkt_pos                = VAR_1->pkt_pos;

    VAR_0->pkt_size               = VAR_1->pkt_size;

    VAR_0->pkt_duration           = VAR_1->pkt_duration;

    VAR_0->reordered_opaque       = VAR_1->reordered_opaque;

    VAR_0->quality                = VAR_1->quality;

    VAR_0->best_effort_timestamp  = VAR_1->best_effort_timestamp;

    VAR_0->coded_picture_number   = VAR_1->coded_picture_number;

    VAR_0->display_picture_number = VAR_1->display_picture_number;

    VAR_0->flags                  = VAR_1->flags;

    VAR_0->decode_error_flags     = VAR_1->decode_error_flags;

    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_location        = VAR_1->chroma_location;



    av_dict_copy(&VAR_0->metadata, VAR_1->metadata, 0);



#if FF_API_ERROR_FRAME

FF_DISABLE_DEPRECATION_WARNINGS

    memcpy(VAR_0->error, VAR_1->error, sizeof(VAR_0->error));

FF_ENABLE_DEPRECATION_WARNINGS

#endif



    for (VAR_3 = 0; VAR_3 < VAR_1->nb_side_data; VAR_3++) {

        const AVFrameSideData *sd_src = VAR_1->side_data[VAR_3];

        AVFrameSideData *sd_dst;

        if (   sd_src->type == AV_FRAME_DATA_PANSCAN

            && (VAR_1->width != VAR_0->width || VAR_1->height != VAR_0->height))

            continue;

        if (VAR_2) {

            sd_dst = av_frame_new_side_data(VAR_0, sd_src->type,

                                            sd_src->size);

            if (!sd_dst) {

                wipe_side_data(VAR_0);

                return AVERROR(ENOMEM);


            memcpy(sd_dst->data, sd_src->data, sd_src->size);

        } else {

            sd_dst = av_frame_new_side_data(VAR_0, sd_src->type, 0);

            if (!sd_dst) {

                wipe_side_data(VAR_0);

                return AVERROR(ENOMEM);


            if (sd_src->buf) {

            sd_dst->buf = av_buffer_ref(sd_src->buf);

            if (!sd_dst->buf) {

                wipe_side_data(VAR_0);

                return AVERROR(ENOMEM);


            sd_dst->data = sd_dst->buf->data;

            sd_dst->size = sd_dst->buf->size;



        av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0);




#if FF_API_FRAME_QP

FF_DISABLE_DEPRECATION_WARNINGS

    VAR_0->qscale_table = NULL;

    VAR_0->qstride      = 0;

    VAR_0->qscale_type  = 0;

    av_buffer_unref(&VAR_0->qp_table_buf);

    if (VAR_1->qp_table_buf) {

        VAR_0->qp_table_buf = av_buffer_ref(VAR_1->qp_table_buf);

        if (VAR_0->qp_table_buf) {

            VAR_0->qscale_table = VAR_0->qp_table_buf->data;

            VAR_0->qstride      = VAR_1->qstride;

            VAR_0->qscale_type  = VAR_1->qscale_type;



FF_ENABLE_DEPRECATION_WARNINGS

#endif



    return 0;

static int FUNC_0(AVFrame *VAR_0, const AVFrame *VAR_1, int VAR_2)
{ int VAR_3; VAR_0->key_frame              = VAR_1->key_frame; VAR_0->pict_type              = VAR_1->pict_type; VAR_0->sample_aspect_ratio    = VAR_1->sample_aspect_ratio; VAR_0->pts                    = VAR_1->pts; VAR_0->repeat_pict            = VAR_1->repeat_pict; VAR_0->interlaced_frame       = VAR_1->interlaced_frame; VAR_0->top_field_first        = VAR_1->top_field_first; VAR_0->palette_has_changed    = VAR_1->palette_has_changed; VAR_0->sample_rate            = VAR_1->sample_rate; VAR_0->opaque                 = VAR_1->opaque; #if FF_API_PKT_PTS
FF_DISABLE_DEPRECATION_WARNINGS
VAR_0->pkt_pts                = VAR_1->pkt_pts; FF_ENABLE_DEPRECATION_WARNINGS
#endif
VAR_0->pkt_dts                = VAR_1->pkt_dts; VAR_0->pkt_pos                = VAR_1->pkt_pos; VAR_0->pkt_size               = VAR_1->pkt_size; VAR_0->pkt_duration           = VAR_1->pkt_duration; VAR_0->reordered_opaque       = VAR_1->reordered_opaque; VAR_0->quality                = VAR_1->quality; VAR_0->best_effort_timestamp  = VAR_1->best_effort_timestamp; VAR_0->coded_picture_number   = VAR_1->coded_picture_number; VAR_0->display_picture_number = VAR_1->display_picture_number; VAR_0->flags                  = VAR_1->flags; VAR_0->decode_error_flags     = VAR_1->decode_error_flags; 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_location        = VAR_1->chroma_location; av_dict_copy(&VAR_0->metadata, VAR_1->metadata, 0); #if FF_API_ERROR_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
memcpy(VAR_0->error, VAR_1->error, sizeof(VAR_0->error)); FF_ENABLE_DEPRECATION_WARNINGS
#endif
for (VAR_3 = 0; VAR_3 < VAR_1->nb_side_data; VAR_3++) { const AVFrameSideData *sd_src = VAR_1->side_data[VAR_3]; AVFrameSideData *sd_dst; if (   sd_src->type == AV_FRAME_DATA_PANSCAN
&& (VAR_1->width != VAR_0->width || VAR_1->height != VAR_0->height))
continue; if (VAR_2) { sd_dst = av_frame_new_side_data(VAR_0, sd_src->type,
sd_src->size); if (!sd_dst) { wipe_side_data(VAR_0); return AVERROR(ENOMEM); memcpy(sd_dst->data, sd_src->data, sd_src->size); } else { sd_dst = av_frame_new_side_data(VAR_0, sd_src->type, 0); if (!sd_dst) { wipe_side_data(VAR_0); return AVERROR(ENOMEM); if (sd_src->buf) { sd_dst->buf = av_buffer_ref(sd_src->buf); if (!sd_dst->buf) { wipe_side_data(VAR_0); return AVERROR(ENOMEM); sd_dst->data = sd_dst->buf->data; sd_dst->size = sd_dst->buf->size; av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0); #if FF_API_FRAME_QP
FF_DISABLE_DEPRECATION_WARNINGS
VAR_0->qscale_table = NULL; VAR_0->qstride      = 0; VAR_0->qscale_type  = 0; av_buffer_unref(&VAR_0->qp_table_buf); if (VAR_1->qp_table_buf) { VAR_0->qp_table_buf = av_buffer_ref(VAR_1->qp_table_buf); if (VAR_0->qp_table_buf) { VAR_0->qscale_table = VAR_0->qp_table_buf->data; VAR_0->qstride      = VAR_1->qstride; VAR_0->qscale_type  = VAR_1->qscale_type; FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0;