[Asterisk-cvs] asterisk/codecs codec_g723_1.c,1.12,1.12.2.1

markster at lists.digium.com markster at lists.digium.com
Mon Apr 12 10:56:53 CDT 2004


Update of /usr/cvsroot/asterisk/codecs
In directory mongoose.digium.com:/tmp/cvs-serv13282/codecs

Modified Files:
      Tag: v1-0_stable
	codec_g723_1.c 
Log Message:
Backport head changes


Index: codec_g723_1.c
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/codec_g723_1.c,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- codec_g723_1.c	27 Sep 2003 02:45:37 -0000	1.12
+++ codec_g723_1.c	12 Apr 2004 14:58:55 -0000	1.12.2.1
@@ -115,7 +115,7 @@
 	f.subclass = AST_FORMAT_SLINEAR;
 	f.datalen = sizeof(slin_g723_ex);
 	/* Assume 8000 Hz */
-	f.samples = sizeof(slin_g723_ex)/16;
+	f.samples = sizeof(slin_g723_ex)/2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
@@ -130,7 +130,7 @@
 	f.subclass = AST_FORMAT_G723_1;
 	f.datalen = sizeof(g723_slin_ex);
 	/* All frames are 30 ms long */
-	f.samples = 30;
+	f.samples = 240;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
@@ -167,7 +167,7 @@
 	tmp->f.subclass = AST_FORMAT_SLINEAR;
 	tmp->f.datalen = tmp->tail * 2;
 	/* Assume 8000 Hz */
-	tmp->f.samples = tmp->tail / 8;
+	tmp->f.samples = tmp->tail;
 	tmp->f.mallocd = 0;
 	tmp->f.offset = AST_FRIENDLY_OFFSET;
 	tmp->f.src = __PRETTY_FUNCTION__;
@@ -296,9 +296,8 @@
 		Coder(&tmp->cod, tmp->buf, tmp->outbuf + cnt);
 #endif
 		/* Assume 8000 Hz */
-		tmp->f.samples += 30;
-		/* FIXME:SLD: Shouldn't the [0] be [cnt]?? */
-		cnt += g723_len(tmp->outbuf[0]);
+		tmp->f.samples += 240;
+		cnt += g723_len(tmp->outbuf[cnt]);
 		tmp->tail -= Frame;
 		/* Move the data at the end of the buffer to the front */
 		if (tmp->tail)




More information about the svn-commits mailing list