[asterisk-commits] murf: branch 1.4 r43605 - /branches/1.4/formats/format_ogg_vorbis.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Sep 25 07:52:29 MST 2006


Author: murf
Date: Mon Sep 25 09:52:28 2006
New Revision: 43605

URL: http://svn.digium.com/view/asterisk?rev=43605&view=rev
Log:
This tiny fix prevents asterisk from crashing if trying to play an OGG moh file.

Modified:
    branches/1.4/formats/format_ogg_vorbis.c

Modified: branches/1.4/formats/format_ogg_vorbis.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/formats/format_ogg_vorbis.c?rev=43605&r1=43604&r2=43605&view=diff
==============================================================================
--- branches/1.4/formats/format_ogg_vorbis.c (original)
+++ branches/1.4/formats/format_ogg_vorbis.c Mon Sep 25 09:52:28 2006
@@ -440,12 +440,13 @@
 	int samples_in;
 	int samples_out = 0;
 	struct vorbis_desc *s = (struct vorbis_desc *)fs->private;
-	short *buf = (short *)(fs->fr.data);	/* SLIN data buffer */
+	short *buf;	/* SLIN data buffer */
 
 	fs->fr.frametype = AST_FRAME_VOICE;
 	fs->fr.subclass = AST_FORMAT_SLINEAR;
 	fs->fr.mallocd = 0;
 	AST_FRAME_SET_BUFFER(&fs->fr, fs->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
+	buf = (short *)(fs->fr.data);	/* SLIN data buffer */
 
 	while (samples_out != SAMPLES_MAX) {
 		float **pcm;



More information about the asterisk-commits mailing list