static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,

                               int *data_size, AVPacket *avpkt)

{

    const uint8_t *buf = avpkt->data;

    int buf_size       = avpkt->size;

    AMRWBContext *s    = avctx->priv_data;

    int mode;

    int packet_size;

    static const uint8_t block_size[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1};



    mode        = (buf[0] >> 3) & 0x000F;

    packet_size = block_size[mode];



    if (packet_size > buf_size) {

        av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n",

               buf_size, packet_size + 1);

        return AVERROR_INVALIDDATA;

    }



    D_IF_decode(s->state, buf, data, _good_frame);

    *data_size = 320 * 2;

    return packet_size;

}

static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,

                               int *data_size, AVPacket *avpkt)

{

    const uint8_t *buf = avpkt->data;

    int buf_size       = avpkt->size;

    AMRWBContext *s    = avctx->priv_data;

    int mode;

    int packet_size;

    static const uint8_t block_size[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1};



    mode        = (buf[0] >> 3) & 0x000F;

    packet_size = block_size[mode];



    if (packet_size > buf_size) {

        av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n",

               buf_size, packet_size + 1);

        return AVERROR_INVALIDDATA;

    }



    D_IF_decode(s->state, buf, data, _good_frame);

    *data_size = 320 * 2;

    return packet_size;

}

static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,

                               int *VAR_2, AVPacket *VAR_3)

{

    const uint8_t *VAR_4 = VAR_3->VAR_1;

    int VAR_5       = VAR_3->size;

    AMRWBContext *s    = VAR_0->priv_data;

    int VAR_6;

    int VAR_7;

    static const uint8_t VAR_8[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1};



    VAR_6        = (VAR_4[0] >> 3) & 0x000F;

    VAR_7 = VAR_8[VAR_6];



    if (VAR_7 > VAR_5) {

        av_log(VAR_0, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n",

               VAR_5, VAR_7 + 1);

        return AVERROR_INVALIDDATA;

    }



    D_IF_decode(s->state, VAR_4, VAR_1, _good_frame);

    *VAR_2 = 320 * 2;

    return VAR_7;

}

static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{ const uint8_t *VAR_4 = VAR_3->VAR_1; int VAR_5       = VAR_3->size; AMRWBContext *s    = VAR_0->priv_data; int VAR_6; int VAR_7; static const uint8_t VAR_8[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1}; VAR_6        = (VAR_4[0] >> 3) & 0x000F; VAR_7 = VAR_8[VAR_6]; if (VAR_7 > VAR_5) { av_log(VAR_0, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n",
VAR_5, VAR_7 + 1); return AVERROR_INVALIDDATA; } D_IF_decode(s->state, VAR_4, VAR_1, _good_frame); *VAR_2 = 320 * 2; return VAR_7; }