static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)

{

    const uint8_t *buf_ptr;

    unsigned int v, v2;

    int val;

    int skipped = 0;



    buf_ptr = *pbuf_ptr;

    while (buf_ptr < buf_end) {

        v  = *buf_ptr++;

        v2 = *buf_ptr;

        if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe) && buf_ptr < buf_end) {

            val = *buf_ptr++;

            goto found;

        }

        skipped++;

    }

    val = -1;

found:

    av_dlog(NULL, "find_marker skipped %d bytes\n", skipped);

    *pbuf_ptr = buf_ptr;

    return val;

}

static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)

{

    const uint8_t *buf_ptr;

    unsigned int v, v2;

    int val;

    int skipped = 0;



    buf_ptr = *pbuf_ptr;

    while (buf_ptr < buf_end) {

        v  = *buf_ptr++;

        v2 = *buf_ptr;

        if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe) && buf_ptr < buf_end) {

            val = *buf_ptr++;

            goto found;

        }

        skipped++;

    }

    val = -1;

found:

    av_dlog(NULL, "find_marker skipped %d bytes\n", skipped);

    *pbuf_ptr = buf_ptr;

    return val;

}

    while (buf_ptr < buf_end) {
static int FUNC_0(const uint8_t **VAR_0, const uint8_t *VAR_1)

{

    const uint8_t *VAR_2;

    unsigned int VAR_3, VAR_4;

    int VAR_5;

    int VAR_6 = 0;



    VAR_2 = *VAR_0;

    while (VAR_2 < VAR_1) {

        VAR_3  = *VAR_2++;

        VAR_4 = *VAR_2;

        if ((VAR_3 == 0xff) && (VAR_4 >= 0xc0) && (VAR_4 <= 0xfe) && VAR_2 < VAR_1) {

            VAR_5 = *VAR_2++;

            goto found;

        }

        VAR_6++;

    }

    VAR_5 = -1;

found:

    av_dlog(NULL, "FUNC_0 VAR_6 %d bytes\n", VAR_6);

    *VAR_0 = VAR_2;

    return VAR_5;

}

static int FUNC_0(const uint8_t **VAR_0, const uint8_t *VAR_1)
{ const uint8_t *VAR_2; unsigned int VAR_3, VAR_4; int VAR_5; int VAR_6 = 0; VAR_2 = *VAR_0; while (VAR_2 < VAR_1) { VAR_3  = *VAR_2++; VAR_4 = *VAR_2; if ((VAR_3 == 0xff) && (VAR_4 >= 0xc0) && (VAR_4 <= 0xfe) && VAR_2 < VAR_1) { VAR_5 = *VAR_2++; goto found; } VAR_6++; } VAR_5 = -1; found:
av_dlog(NULL, "FUNC_0 VAR_6 %d bytes\n", VAR_6); *VAR_0 = VAR_2; return VAR_5; }