[asterisk-commits] pcadach: trunk r54325 - /trunk/codecs/codec_g722.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 14 01:34:11 MST 2007


Author: pcadach
Date: Wed Feb 14 02:34:10 2007
New Revision: 54325

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54325
Log:
I don't know how it worked earlier, but valgrind
produces core every time you try to load codec_g722.

Fixed. ;-)

Modified:
    trunk/codecs/codec_g722.c

Modified: trunk/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_g722.c?view=diff&rev=54325&r1=54324&r2=54325
==============================================================================
--- trunk/codecs/codec_g722.c (original)
+++ trunk/codecs/codec_g722.c Wed Feb 14 02:34:10 2007
@@ -117,7 +117,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G722,
 		.datalen = sizeof(g722_slin_ex),
-		.samples = sizeof(g722_slin_ex),
+		.samples = sizeof(g722_slin_ex) / sizeof(g722_slin_ex[0]),
 		.src = __PRETTY_FUNCTION__,
 		.data = g722_slin_ex,
 	};
@@ -131,7 +131,7 @@
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR,
 		.datalen = sizeof(slin_g722_ex),
-		.samples = sizeof(slin_g722_ex),
+		.samples = sizeof(slin_g722_ex) / sizeof(slin_g722_ex[0]),
 		.src = __PRETTY_FUNCTION__,
 		.data = slin_g722_ex,
 	};



More information about the asterisk-commits mailing list