static int parse_packet_header(WMAVoiceContext *s)

{

    GetBitContext *gb = &s->gb;

    unsigned int res;



    if (get_bits_left(gb) < 11)

        return 1;

    skip_bits(gb, 4);          // packet sequence number

    s->has_residual_lsps = get_bits1(gb);

    do {

        res = get_bits(gb, 6); // number of superframes per packet

                               // (minus first one if there is spillover)

        if (get_bits_left(gb) < 6 * (res == 0x3F) + s->spillover_bitsize)

            return 1;

    } while (res == 0x3F);

    s->spillover_nbits   = get_bits(gb, s->spillover_bitsize);



    return 0;

}

static int parse_packet_header(WMAVoiceContext *s)

{

    GetBitContext *gb = &s->gb;

    unsigned int res;



    if (get_bits_left(gb) < 11)

        return 1;

    skip_bits(gb, 4);          

    s->has_residual_lsps = get_bits1(gb);

    do {

        res = get_bits(gb, 6); 

                               

        if (get_bits_left(gb) < 6 * (res == 0x3F) + s->spillover_bitsize)

            return 1;

    } while (res == 0x3F);

    s->spillover_nbits   = get_bits(gb, s->spillover_bitsize);



    return 0;

}

static int FUNC_0(WMAVoiceContext *VAR_0)

{

    GetBitContext *gb = &VAR_0->gb;

    unsigned int VAR_1;



    if (get_bits_left(gb) < 11)

        return 1;

    skip_bits(gb, 4);          

    VAR_0->has_residual_lsps = get_bits1(gb);

    do {

        VAR_1 = get_bits(gb, 6); 

                               

        if (get_bits_left(gb) < 6 * (VAR_1 == 0x3F) + VAR_0->spillover_bitsize)

            return 1;

    } while (VAR_1 == 0x3F);

    VAR_0->spillover_nbits   = get_bits(gb, VAR_0->spillover_bitsize);



    return 0;

}

static int FUNC_0(WMAVoiceContext *VAR_0)
{ GetBitContext *gb = &VAR_0->gb; unsigned int VAR_1; if (get_bits_left(gb) < 11)
return 1; skip_bits(gb, 4); VAR_0->has_residual_lsps = get_bits1(gb); do { VAR_1 = get_bits(gb, 6); if (get_bits_left(gb) < 6 * (VAR_1 == 0x3F) + VAR_0->spillover_bitsize)
return 1; } while (VAR_1 == 0x3F); VAR_0->spillover_nbits   = get_bits(gb, VAR_0->spillover_bitsize); return 0; }