static int add_metadata_from_side_data(AVCodecContext *avctx, AVFrame *frame)

{

    int size, ret = 0;

    const uint8_t *side_metadata;

    const uint8_t *end;



    side_metadata = av_packet_get_side_data(avctx->pkt,

                                            AV_PKT_DATA_STRINGS_METADATA, &size);

    if (!side_metadata)

        goto end;

    end = side_metadata + size;

    while (side_metadata < end) {

        const uint8_t *key = side_metadata;

        const uint8_t *val = side_metadata + strlen(key) + 1;

        int ret = av_dict_set(avpriv_frame_get_metadatap(frame), key, val, 0);

        if (ret < 0)

            break;

        side_metadata = val + strlen(val) + 1;

    }

end:

    return ret;

}

static int add_metadata_from_side_data(AVCodecContext *avctx, AVFrame *frame)

{

    int size, ret = 0;

    const uint8_t *side_metadata;

    const uint8_t *end;



    side_metadata = av_packet_get_side_data(avctx->pkt,

                                            AV_PKT_DATA_STRINGS_METADATA, &size);

    if (!side_metadata)

        goto end;

    end = side_metadata + size;

    while (side_metadata < end) {

        const uint8_t *key = side_metadata;

        const uint8_t *val = side_metadata + strlen(key) + 1;

        int ret = av_dict_set(avpriv_frame_get_metadatap(frame), key, val, 0);

        if (ret < 0)

            break;

        side_metadata = val + strlen(val) + 1;

    }

end:

    return ret;

}

        int ret = av_dict_set(avpriv_frame_get_metadatap(frame), key, val, 0);
static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)

{

    int VAR_2, VAR_8 = 0;

    const uint8_t *VAR_4;

    const uint8_t *VAR_5;



    VAR_4 = av_packet_get_side_data(VAR_0->pkt,

                                            AV_PKT_DATA_STRINGS_METADATA, &VAR_2);

    if (!VAR_4)

        goto VAR_5;

    VAR_5 = VAR_4 + VAR_2;

    while (VAR_4 < VAR_5) {

        const uint8_t *VAR_6 = VAR_4;

        const uint8_t *VAR_7 = VAR_4 + strlen(VAR_6) + 1;

        int VAR_8 = av_dict_set(avpriv_frame_get_metadatap(VAR_1), VAR_6, VAR_7, 0);

        if (VAR_8 < 0)

            break;

        VAR_4 = VAR_7 + strlen(VAR_7) + 1;

    }

VAR_5:

    return VAR_8;

}

static int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)
{ int VAR_2, VAR_8 = 0; const uint8_t *VAR_4; const uint8_t *VAR_5; VAR_4 = av_packet_get_side_data(VAR_0->pkt,
AV_PKT_DATA_STRINGS_METADATA, &VAR_2); if (!VAR_4)
goto VAR_5; VAR_5 = VAR_4 + VAR_2; while (VAR_4 < VAR_5) { const uint8_t *VAR_6 = VAR_4; const uint8_t *VAR_7 = VAR_4 + strlen(VAR_6) + 1; int VAR_8 = av_dict_set(avpriv_frame_get_metadatap(VAR_1), VAR_6, VAR_7, 0); if (VAR_8 < 0)
break; VAR_4 = VAR_7 + strlen(VAR_7) + 1; } VAR_5:
return VAR_8; }