int av_packet_copy_props(AVPacket *dst, const AVPacket *src)

{

    int i;



    dst->pts                  = src->pts;

    dst->dts                  = src->dts;

    dst->pos                  = src->pos;

    dst->duration             = src->duration;

    dst->convergence_duration = src->convergence_duration;

    dst->flags                = src->flags;

    dst->stream_index         = src->stream_index;

    dst->side_data_elems      = src->side_data_elems;



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

         enum AVPacketSideDataType type = src->side_data[i].type;

         int size          = src->side_data[i].size;

         uint8_t *src_data = src->side_data[i].data;

         uint8_t *dst_data = av_packet_new_side_data(dst, type, size);



        if (!dst_data) {

            av_packet_free_side_data(dst);

            return AVERROR(ENOMEM);

        }

        memcpy(dst_data, src_data, size);

    }



    return 0;

}

int av_packet_copy_props(AVPacket *dst, const AVPacket *src)

{

    int i;



    dst->pts                  = src->pts;

    dst->dts                  = src->dts;

    dst->pos                  = src->pos;

    dst->duration             = src->duration;

    dst->convergence_duration = src->convergence_duration;

    dst->flags                = src->flags;

    dst->stream_index         = src->stream_index;

    dst->side_data_elems      = src->side_data_elems;



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

         enum AVPacketSideDataType type = src->side_data[i].type;

         int size          = src->side_data[i].size;

         uint8_t *src_data = src->side_data[i].data;

         uint8_t *dst_data = av_packet_new_side_data(dst, type, size);



        if (!dst_data) {

            av_packet_free_side_data(dst);

            return AVERROR(ENOMEM);

        }

        memcpy(dst_data, src_data, size);

    }



    return 0;

}

int FUNC_0(AVPacket *VAR_0, const AVPacket *VAR_1)

{

    int VAR_2;



    VAR_0->pts                  = VAR_1->pts;

    VAR_0->dts                  = VAR_1->dts;

    VAR_0->pos                  = VAR_1->pos;

    VAR_0->duration             = VAR_1->duration;

    VAR_0->convergence_duration = VAR_1->convergence_duration;

    VAR_0->flags                = VAR_1->flags;

    VAR_0->stream_index         = VAR_1->stream_index;

    VAR_0->side_data_elems      = VAR_1->side_data_elems;



    for (VAR_2 = 0; VAR_2 < VAR_1->side_data_elems; VAR_2++) {

         enum AVPacketSideDataType type = VAR_1->side_data[VAR_2].type;

         int size          = VAR_1->side_data[VAR_2].size;

         uint8_t *src_data = VAR_1->side_data[VAR_2].data;

         uint8_t *dst_data = av_packet_new_side_data(VAR_0, type, size);



        if (!dst_data) {

            av_packet_free_side_data(VAR_0);

            return AVERROR(ENOMEM);

        }

        memcpy(dst_data, src_data, size);

    }



    return 0;

}

int FUNC_0(AVPacket *VAR_0, const AVPacket *VAR_1)
{ int VAR_2; VAR_0->pts                  = VAR_1->pts; VAR_0->dts                  = VAR_1->dts; VAR_0->pos                  = VAR_1->pos; VAR_0->duration             = VAR_1->duration; VAR_0->convergence_duration = VAR_1->convergence_duration; VAR_0->flags                = VAR_1->flags; VAR_0->stream_index         = VAR_1->stream_index; VAR_0->side_data_elems      = VAR_1->side_data_elems; for (VAR_2 = 0; VAR_2 < VAR_1->side_data_elems; VAR_2++) { enum AVPacketSideDataType type = VAR_1->side_data[VAR_2].type; int size          = VAR_1->side_data[VAR_2].size; uint8_t *src_data = VAR_1->side_data[VAR_2].data; uint8_t *dst_data = av_packet_new_side_data(VAR_0, type, size); if (!dst_data) { av_packet_free_side_data(VAR_0); return AVERROR(ENOMEM); } memcpy(dst_data, src_data, size); } return 0; }