static int decode_tag(AVCodecContext * avctx,

                      void *data, int *data_size,

                      AVPacket *avpkt) {

    const uint8_t *buf = avpkt->data;

    int buf_size = avpkt->size;

    NellyMoserDecodeContext *s = avctx->priv_data;

    int blocks, i;

    int16_t* samples;

    *data_size = 0;

    samples = (int16_t*)data;



    if (buf_size < avctx->block_align)

        return buf_size;



    if (buf_size % 64) {

        av_log(avctx, AV_LOG_ERROR, "Tag size %d.\n", buf_size);

        return buf_size;

    }

    blocks = buf_size / 64;

    /* Normal numbers of blocks for sample rates:

     *  8000 Hz - 1

     * 11025 Hz - 2

     * 16000 Hz - 3

     * 22050 Hz - 4

     * 44100 Hz - 8

     */



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

        nelly_decode_block(s, &buf[i*NELLY_BLOCK_LEN], s->float_buf);

        s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES);

        *data_size += NELLY_SAMPLES*sizeof(int16_t);

    }



    return buf_size;

}

static int decode_tag(AVCodecContext * avctx,

                      void *data, int *data_size,

                      AVPacket *avpkt) {

    const uint8_t *buf = avpkt->data;

    int buf_size = avpkt->size;

    NellyMoserDecodeContext *s = avctx->priv_data;

    int blocks, i;

    int16_t* samples;

    *data_size = 0;

    samples = (int16_t*)data;



    if (buf_size < avctx->block_align)

        return buf_size;



    if (buf_size % 64) {

        av_log(avctx, AV_LOG_ERROR, "Tag size %d.\n", buf_size);

        return buf_size;

    }

    blocks = buf_size / 64;

    















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

        nelly_decode_block(s, &buf[i*NELLY_BLOCK_LEN], s->float_buf);

        s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES);

        *data_size += NELLY_SAMPLES*sizeof(int16_t);

    }



    return buf_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;

    NellyMoserDecodeContext *s = VAR_0->priv_data;

    int VAR_6, VAR_7;

    int16_t* samples;

    *VAR_2 = 0;

    samples = (int16_t*)VAR_1;



    if (VAR_5 < VAR_0->block_align)

        return VAR_5;



    if (VAR_5 % 64) {

        av_log(VAR_0, AV_LOG_ERROR, "Tag size %d.\n", VAR_5);

        return VAR_5;

    }

    VAR_6 = VAR_5 / 64;

    















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

        nelly_decode_block(s, &VAR_4[VAR_7*NELLY_BLOCK_LEN], s->float_buf);

        s->fmt_conv.float_to_int16(&samples[VAR_7*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES);

        *VAR_2 += NELLY_SAMPLES*sizeof(int16_t);

    }



    return VAR_5;

}

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; NellyMoserDecodeContext *s = VAR_0->priv_data; int VAR_6, VAR_7; int16_t* samples; *VAR_2 = 0; samples = (int16_t*)VAR_1; if (VAR_5 < VAR_0->block_align)
return VAR_5; if (VAR_5 % 64) { av_log(VAR_0, AV_LOG_ERROR, "Tag size %d.\n", VAR_5); return VAR_5; } VAR_6 = VAR_5 / 64; for (VAR_7=0 ; VAR_7<VAR_6 ; VAR_7++) { nelly_decode_block(s, &VAR_4[VAR_7*NELLY_BLOCK_LEN], s->float_buf); s->fmt_conv.float_to_int16(&samples[VAR_7*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES); *VAR_2 += NELLY_SAMPLES*sizeof(int16_t); } return VAR_5; }