diff options
author | Benoit Fouet <benoit.fouet@purplelabs.com> | 2007-03-08 10:06:59 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-03-08 10:06:59 +0000 |
commit | e7a5854d23e139f5352b59e094387823dbf82522 (patch) | |
tree | cdb02e440a7f9d3fd70bb77d6123dcb0931eacdc | |
parent | 6cbac7ed3ab92dfd2b2264234eaf9686db64e95d (diff) | |
download | ffmpeg-e7a5854d23e139f5352b59e094387823dbf82522.tar.gz |
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.
Originally committed as revision 8290 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/amr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/amr.c b/libavcodec/amr.c index 3c089aaf0f..7a6bf0bae5 100644 --- a/libavcodec/amr.c +++ b/libavcodec/amr.c @@ -607,9 +607,9 @@ static int amr_wb_encode_close(AVCodecContext * avctx) 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; |