[svn-commits] qwell: branch 1.4 r111245 - /branches/1.4/main/frame.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 26 18:26:33 CDT 2008


Author: qwell
Date: Wed Mar 26 18:26:33 2008
New Revision: 111245

URL: http://svn.digium.com/view/asterisk?view=rev&rev=111245
Log:
Remove excessive smoother optimization that was causing audio glitches (small "pops")
 after (about 200ms later) an "incorrectly" sized frame was received.

While it would be very nice to keep this as optimized as possible, it makes no sense
 for the smoother to be dropping random bits of audio like this.  Isn't that the
 whole point of a smoother?

Closes issue #12093.

Modified:
    branches/1.4/main/frame.c

Modified: branches/1.4/main/frame.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/frame.c?view=diff&rev=111245&r1=111244&r2=111245
==============================================================================
--- branches/1.4/main/frame.c (original)
+++ branches/1.4/main/frame.c Wed Mar 26 18:26:33 2008
@@ -92,7 +92,6 @@
 	int size;
 	int format;
 	int readdata;
-	int optimizablestream;
 	int flags;
 	float samplesperbyte;
 	struct ast_frame f;
@@ -195,23 +194,8 @@
 				ast_swapcopy_samples(f->data, f->data, f->samples);
 			s->opt = f;
 			return 0;
-		} else {
-			s->optimizablestream++;
-			if (s->optimizablestream > 10) {
-				/* For the past 10 rounds, we have input and output
-				   frames of the correct size for this smoother, yet
-				   we were unable to optimize because there was still
-				   some cruft left over.  Lets just drop the cruft so
-				   we can move to a fully optimized path */
-				if (swap)
-					ast_swapcopy_samples(f->data, f->data, f->samples);
-				s->len = 0;
-				s->opt = f;
-				return 0;
-			}
-		}
-	} else 
-		s->optimizablestream = 0;
+		}
+	}
 	if (s->flags & AST_SMOOTHER_FLAG_G729) {
 		if (s->len % 10) {
 			ast_log(LOG_NOTICE, "Dropping extra frame of G.729 since we already have a VAD frame at the end\n");




More information about the svn-commits mailing list