# HG changeset patch # User takis # Date 1173348419 0 # Node ID 260b5f667458497610eb458adc7b5b06d76ae78a # Parent cd3e32d16136f17e95f5023cded2b4f8d7b908c4 Move the initialization on context definition. In amr.c, only the amr_wb_encode_frame function initialized its context on a different line as it defined it. Patch by Benoit Fouet, benoit fouet % purplelabs com. diff -r cd3e32d16136 -r 260b5f667458 amr.c --- a/amr.c Wed Mar 07 09:51:45 2007 +0000 +++ b/amr.c Thu Mar 08 10:06:59 2007 +0000 @@ -607,9 +607,9 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, unsigned char *frame/*out*/, int buf_size, void *data/*in*/) { - AMRWBContext *s; + AMRWBContext *s = (AMRWBContext*) avctx->priv_data; int size; - s = (AMRWBContext*) avctx->priv_data; + s->mode=getWBBitrateMode(avctx->bit_rate); size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx); return size;