[Ffmpeg-cvslog] r8290 - trunk/libavcodec/amr.c

takis subversion
Thu Mar 8 11:06:59 CET 2007


Author: takis
Date: Thu Mar  8 11:06:59 2007
New Revision: 8290

Modified:
   trunk/libavcodec/amr.c

Log:
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.


Modified: trunk/libavcodec/amr.c
==============================================================================
--- trunk/libavcodec/amr.c	(original)
+++ trunk/libavcodec/amr.c	Thu Mar  8 11:06:59 2007
@@ -607,9 +607,9 @@ static int amr_wb_encode_close(AVCodecCo
 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;




More information about the ffmpeg-cvslog mailing list