static int asf_read_generic_value(AVFormatContext *s, uint8_t *name, uint16_t name_len,

                                  int type, AVDictionary **met)

{

    AVIOContext *pb = s->pb;

    uint64_t value;

    char buf[32];



    switch (type) {

    case ASF_BOOL:

        value = avio_rl32(pb);

        break;

    case ASF_DWORD:

        value = avio_rl32(pb);

        break;

    case ASF_QWORD:

        value = avio_rl64(pb);

        break;

    case ASF_WORD:

        value = avio_rl16(pb);

        break;

    default:

        av_freep(&name);

        return AVERROR_INVALIDDATA;

    }

    snprintf(buf, sizeof(buf), "%"PRIu64, value);

    if (av_dict_set(met, name, buf, 0) < 0)

        av_log(s, AV_LOG_WARNING, "av_dict_set failed.\n");



    return 0;

}

static int asf_read_generic_value(AVFormatContext *s, uint8_t *name, uint16_t name_len,

                                  int type, AVDictionary **met)

{

    AVIOContext *pb = s->pb;

    uint64_t value;

    char buf[32];



    switch (type) {

    case ASF_BOOL:

        value = avio_rl32(pb);

        break;

    case ASF_DWORD:

        value = avio_rl32(pb);

        break;

    case ASF_QWORD:

        value = avio_rl64(pb);

        break;

    case ASF_WORD:

        value = avio_rl16(pb);

        break;

    default:

        av_freep(&name);

        return AVERROR_INVALIDDATA;

    }

    snprintf(buf, sizeof(buf), "%"PRIu64, value);

    if (av_dict_set(met, name, buf, 0) < 0)

        av_log(s, AV_LOG_WARNING, "av_dict_set failed.\n");



    return 0;

}

static int asf_read_generic_value(AVFormatContext *s, uint8_t *name, uint16_t name_len,                                   int type, AVDictionary **met)         av_freep(&name);
static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, uint16_t VAR_2,

                                  int VAR_3, AVDictionary **VAR_4)

{

    AVIOContext *pb = VAR_0->pb;

    uint64_t value;

    char VAR_5[32];



    switch (VAR_3) {

    case ASF_BOOL:

        value = avio_rl32(pb);

        break;

    case ASF_DWORD:

        value = avio_rl32(pb);

        break;

    case ASF_QWORD:

        value = avio_rl64(pb);

        break;

    case ASF_WORD:

        value = avio_rl16(pb);

        break;

    default:

        av_freep(&VAR_1);

        return AVERROR_INVALIDDATA;

    }

    snprintf(VAR_5, sizeof(VAR_5), "%"PRIu64, value);

    if (av_dict_set(VAR_4, VAR_1, VAR_5, 0) < 0)

        av_log(VAR_0, AV_LOG_WARNING, "av_dict_set failed.\n");



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, uint16_t VAR_2,
int VAR_3, AVDictionary **VAR_4)
{ AVIOContext *pb = VAR_0->pb; uint64_t value; char VAR_5[32]; switch (VAR_3) { case ASF_BOOL:
value = avio_rl32(pb); break; case ASF_DWORD:
value = avio_rl32(pb); break; case ASF_QWORD:
value = avio_rl64(pb); break; case ASF_WORD:
value = avio_rl16(pb); break; default:
av_freep(&VAR_1); return AVERROR_INVALIDDATA; } snprintf(VAR_5, sizeof(VAR_5), "%"PRIu64, value); if (av_dict_set(VAR_4, VAR_1, VAR_5, 0) < 0)
av_log(VAR_0, AV_LOG_WARNING, "av_dict_set failed.\n"); return 0; }