static int g726_init(AVCodecContext * avctx)

{

    AVG726Context* c = (AVG726Context*)avctx->priv_data;

    

    if (avctx->sample_rate != 8000 || avctx->channels != 1 ||

        (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 &&

	 avctx->bit_rate != 32000 && avctx->bit_rate != 40000)) {

        av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");

	return -1;

    }

    g726_reset(&c->c, avctx->bit_rate);

    c->code_size = c->c.tbls->bits;

    c->bit_buffer = 0;

    c->bits_left = 0;



    return 0;

}

static int g726_init(AVCodecContext * avctx)

{

    AVG726Context* c = (AVG726Context*)avctx->priv_data;

    

    if (avctx->sample_rate != 8000 || avctx->channels != 1 ||

        (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 &&

	 avctx->bit_rate != 32000 && avctx->bit_rate != 40000)) {

        av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");

	return -1;

    }

    g726_reset(&c->c, avctx->bit_rate);

    c->code_size = c->c.tbls->bits;

    c->bit_buffer = 0;

    c->bits_left = 0;



    return 0;

}

static int FUNC_0(AVCodecContext * VAR_0)

{

    AVG726Context* c = (AVG726Context*)VAR_0->priv_data;

    

    if (VAR_0->sample_rate != 8000 || VAR_0->channels != 1 ||

        (VAR_0->bit_rate != 16000 && VAR_0->bit_rate != 24000 &&

	 VAR_0->bit_rate != 32000 && VAR_0->bit_rate != 40000)) {

        av_log(VAR_0, AV_LOG_ERROR, "G726: unsupported audio format\n");

	return -1;

    }

    g726_reset(&c->c, VAR_0->bit_rate);

    c->code_size = c->c.tbls->bits;

    c->bit_buffer = 0;

    c->bits_left = 0;



    return 0;

}

static int FUNC_0(AVCodecContext * VAR_0)
{ AVG726Context* c = (AVG726Context*)VAR_0->priv_data; if (VAR_0->sample_rate != 8000 || VAR_0->channels != 1 ||
(VAR_0->bit_rate != 16000 && VAR_0->bit_rate != 24000 &&
VAR_0->bit_rate != 32000 && VAR_0->bit_rate != 40000)) { av_log(VAR_0, AV_LOG_ERROR, "G726: unsupported audio format\n"); return -1; } g726_reset(&c->c, VAR_0->bit_rate); c->code_size = c->c.tbls->bits; c->bit_buffer = 0; c->bits_left = 0; return 0; }