static int s337m_probe(AVProbeData *p)

{

    uint64_t state = 0;

    int markers[3] = { 0 };

    int i, sum, max, data_type, data_size, offset;

    uint8_t *buf;



    for (buf = p->buf; buf < p->buf + p->buf_size; buf++) {

        state = (state << 8) | *buf;

        if (!IS_LE_MARKER(state))

            continue;



        if (IS_16LE_MARKER(state)) {

            data_type = AV_RL16(buf + 1);

            data_size = AV_RL16(buf + 3);

            buf += 4;

        } else {

            data_type = AV_RL24(buf + 1);

            data_size = AV_RL24(buf + 4);

            buf += 6;

        }



        if (s337m_get_offset_and_codec(NULL, state, data_type, data_size, &offset, NULL))

            continue;



        i = IS_16LE_MARKER(state) ? 0 : IS_20LE_MARKER(state) ? 1 : 2;

        markers[i]++;



        buf  += offset;

        state = 0;

    }



    sum = max = 0;

    for (i = 0; i < FF_ARRAY_ELEMS(markers); i++) {

        sum += markers[i];

        if (markers[max] < markers[i])

            max = i;

    }



    if (markers[max] > 3 && markers[max] * 4 > sum * 3)

        return AVPROBE_SCORE_EXTENSION + 1;



    return 0;

}

static int s337m_probe(AVProbeData *p)

{

    uint64_t state = 0;

    int markers[3] = { 0 };

    int i, sum, max, data_type, data_size, offset;

    uint8_t *buf;



    for (buf = p->buf; buf < p->buf + p->buf_size; buf++) {

        state = (state << 8) | *buf;

        if (!IS_LE_MARKER(state))

            continue;



        if (IS_16LE_MARKER(state)) {

            data_type = AV_RL16(buf + 1);

            data_size = AV_RL16(buf + 3);

            buf += 4;

        } else {

            data_type = AV_RL24(buf + 1);

            data_size = AV_RL24(buf + 4);

            buf += 6;

        }



        if (s337m_get_offset_and_codec(NULL, state, data_type, data_size, &offset, NULL))

            continue;



        i = IS_16LE_MARKER(state) ? 0 : IS_20LE_MARKER(state) ? 1 : 2;

        markers[i]++;



        buf  += offset;

        state = 0;

    }



    sum = max = 0;

    for (i = 0; i < FF_ARRAY_ELEMS(markers); i++) {

        sum += markers[i];

        if (markers[max] < markers[i])

            max = i;

    }



    if (markers[max] > 3 && markers[max] * 4 > sum * 3)

        return AVPROBE_SCORE_EXTENSION + 1;



    return 0;

}

static int FUNC_0(AVProbeData *VAR_0)

{

    uint64_t state = 0;

    int VAR_1[3] = { 0 };

    int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;

    uint8_t *buf;



    for (buf = VAR_0->buf; buf < VAR_0->buf + VAR_0->buf_size; buf++) {

        state = (state << 8) | *buf;

        if (!IS_LE_MARKER(state))

            continue;



        if (IS_16LE_MARKER(state)) {

            VAR_5 = AV_RL16(buf + 1);

            VAR_6 = AV_RL16(buf + 3);

            buf += 4;

        } else {

            VAR_5 = AV_RL24(buf + 1);

            VAR_6 = AV_RL24(buf + 4);

            buf += 6;

        }



        if (s337m_get_offset_and_codec(NULL, state, VAR_5, VAR_6, &VAR_7, NULL))

            continue;



        VAR_2 = IS_16LE_MARKER(state) ? 0 : IS_20LE_MARKER(state) ? 1 : 2;

        VAR_1[VAR_2]++;



        buf  += VAR_7;

        state = 0;

    }



    VAR_3 = VAR_4 = 0;

    for (VAR_2 = 0; VAR_2 < FF_ARRAY_ELEMS(VAR_1); VAR_2++) {

        VAR_3 += VAR_1[VAR_2];

        if (VAR_1[VAR_4] < VAR_1[VAR_2])

            VAR_4 = VAR_2;

    }



    if (VAR_1[VAR_4] > 3 && VAR_1[VAR_4] * 4 > VAR_3 * 3)

        return AVPROBE_SCORE_EXTENSION + 1;



    return 0;

}

static int FUNC_0(AVProbeData *VAR_0)
{ uint64_t state = 0; int VAR_1[3] = { 0 }; int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; uint8_t *buf; for (buf = VAR_0->buf; buf < VAR_0->buf + VAR_0->buf_size; buf++) { state = (state << 8) | *buf; if (!IS_LE_MARKER(state))
continue; if (IS_16LE_MARKER(state)) { VAR_5 = AV_RL16(buf + 1); VAR_6 = AV_RL16(buf + 3); buf += 4; } else { VAR_5 = AV_RL24(buf + 1); VAR_6 = AV_RL24(buf + 4); buf += 6; } if (s337m_get_offset_and_codec(NULL, state, VAR_5, VAR_6, &VAR_7, NULL))
continue; VAR_2 = IS_16LE_MARKER(state) ? 0 : IS_20LE_MARKER(state) ? 1 : 2; VAR_1[VAR_2]++; buf  += VAR_7; state = 0; } VAR_3 = VAR_4 = 0; for (VAR_2 = 0; VAR_2 < FF_ARRAY_ELEMS(VAR_1); VAR_2++) { VAR_3 += VAR_1[VAR_2]; if (VAR_1[VAR_4] < VAR_1[VAR_2])
VAR_4 = VAR_2; } if (VAR_1[VAR_4] > 3 && VAR_1[VAR_4] * 4 > VAR_3 * 3)
return AVPROBE_SCORE_EXTENSION + 1; return 0; }