[asterisk-commits] dvossel: branch 1.4 r265365 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 24 14:37:57 CDT 2010


Author: dvossel
Date: Mon May 24 14:37:55 2010
New Revision: 265365

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=265365
Log:
fixes segfault when using generic plc

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/channel.c?view=diff&rev=265365&r1=265364&r2=265365
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Mon May 24 14:37:55 2010
@@ -2938,6 +2938,11 @@
 	int num_new_samples = frame->samples;
 	struct plc_ds *plc = datastore->data;
 
+	/* If this audio frame has no samples to fill in, ignore it */
+	if (!num_new_samples) {
+		return;
+	}
+
 	/* First, we need to be sure that our buffer is large enough to accomodate
 	 * the samples we need to fill in. This will likely only occur on the first
 	 * frame we write.




More information about the asterisk-commits mailing list