static int read_table(AVFormatContext *avctx, AVStream *st,

                       int (*parse)(AVFormatContext *avctx, AVStream *st,

                                    const char *name, int size))

{

    int count, i;

    AVIOContext *pb = avctx->pb;

    avio_skip(pb, 4);

    count = avio_rb32(pb);

    avio_skip(pb, 4);

    for (i = 0; i < count; i++) {

        char name[17];

        int size;

        avio_read(pb, name, 16);

        name[sizeof(name) - 1] = 0;

        size = avio_rb32(pb);

        if (size < 0) {

            av_log(avctx, AV_LOG_ERROR, "entry size %d is invalid\n", size);

            return AVERROR_INVALIDDATA;

        }

        if (parse(avctx, st, name, size) < 0) {

            avpriv_request_sample(avctx, "Variable %s", name);

            avio_skip(pb, size);

        }

    }

    return 0;

}

static int read_table(AVFormatContext *avctx, AVStream *st,

                       int (*parse)(AVFormatContext *avctx, AVStream *st,

                                    const char *name, int size))

{

    int count, i;

    AVIOContext *pb = avctx->pb;

    avio_skip(pb, 4);

    count = avio_rb32(pb);

    avio_skip(pb, 4);

    for (i = 0; i < count; i++) {

        char name[17];

        int size;

        avio_read(pb, name, 16);

        name[sizeof(name) - 1] = 0;

        size = avio_rb32(pb);

        if (size < 0) {

            av_log(avctx, AV_LOG_ERROR, "entry size %d is invalid\n", size);

            return AVERROR_INVALIDDATA;

        }

        if (parse(avctx, st, name, size) < 0) {

            avpriv_request_sample(avctx, "Variable %s", name);

            avio_skip(pb, size);

        }

    }

    return 0;

}

static int FUNC_0(AVFormatContext *VAR_3, AVStream *VAR_3,

                       int (*VAR_2)(AVFormatContext *VAR_3, AVStream *VAR_3,

                                    const char *VAR_7, int VAR_7))

{

    int VAR_5, VAR_6;

    AVIOContext *pb = VAR_3->pb;

    avio_skip(pb, 4);

    VAR_5 = avio_rb32(pb);

    avio_skip(pb, 4);

    for (VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) {

        char VAR_7[17];

        int VAR_7;

        avio_read(pb, VAR_7, 16);

        VAR_7[sizeof(VAR_7) - 1] = 0;

        VAR_7 = avio_rb32(pb);

        if (VAR_7 < 0) {

            av_log(VAR_3, AV_LOG_ERROR, "entry VAR_7 %d is invalid\n", VAR_7);

            return AVERROR_INVALIDDATA;

        }

        if (VAR_2(VAR_3, VAR_3, VAR_7, VAR_7) < 0) {

            avpriv_request_sample(VAR_3, "Variable %s", VAR_7);

            avio_skip(pb, VAR_7);

        }

    }

    return 0;

}

static int FUNC_0(AVFormatContext *VAR_3, AVStream *VAR_3,
int (*VAR_2)(AVFormatContext *VAR_3, AVStream *VAR_3,
const char *VAR_7, int VAR_7))
{ int VAR_5, VAR_6; AVIOContext *pb = VAR_3->pb; avio_skip(pb, 4); VAR_5 = avio_rb32(pb); avio_skip(pb, 4); for (VAR_6 = 0; VAR_6 < VAR_5; VAR_6++) { char VAR_7[17]; int VAR_7; avio_read(pb, VAR_7, 16); VAR_7[sizeof(VAR_7) - 1] = 0; VAR_7 = avio_rb32(pb); if (VAR_7 < 0) { av_log(VAR_3, AV_LOG_ERROR, "entry VAR_7 %d is invalid\n", VAR_7); return AVERROR_INVALIDDATA; } if (VAR_2(VAR_3, VAR_3, VAR_7, VAR_7) < 0) { avpriv_request_sample(VAR_3, "Variable %s", VAR_7); avio_skip(pb, VAR_7); } } return 0; }