[asterisk-commits] russell: trunk r217113 - /trunk/addons/format_mp3.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 8 13:07:00 CDT 2009


Author: russell
Date: Tue Sep  8 13:06:57 2009
New Revision: 217113

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217113
Log:
Fix audio problems with format_mp3.

This problem was introduced when the AST_FRIENDLY_OFFSET patch was merged.
I'm surprised that nobody noticed any trouble when testing that patch, but this
fixes the code that fills in the buffer to start filling in after the offset
portion of the buffer.

(closes issue #15850)
Reported by: 99gixxer
Patches:
      issue15850.diff1.txt uploaded by russell (license 2)
Tested by: 99gixxer

Modified:
    trunk/addons/format_mp3.c

Modified: trunk/addons/format_mp3.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/format_mp3.c?view=diff&rev=217113&r1=217112&r2=217113
==============================================================================
--- trunk/addons/format_mp3.c (original)
+++ trunk/addons/format_mp3.c Tue Sep  8 13:06:57 2009
@@ -200,7 +200,7 @@
 
 	if(p->dbuflen) {
 		for(p->buflen=0; p->buflen < MP3_BUFLEN && p->buflen < p->dbuflen; p->buflen++) {
-			s->buf[p->buflen] = p->dbuf[p->buflen+p->dbufoffset];
+			s->buf[p->buflen + AST_FRIENDLY_OFFSET] = p->dbuf[p->buflen+p->dbufoffset];
 			p->sbufoffset++;
 		}
 		p->dbufoffset += p->buflen;
@@ -211,7 +211,7 @@
 				return NULL;
 
 			for(save = p->buflen; p->buflen < MP3_BUFLEN; p->buflen++) {
-				s->buf[p->buflen] = p->dbuf[(p->buflen-save)+p->dbufoffset];
+				s->buf[p->buflen + AST_FRIENDLY_OFFSET] = p->dbuf[(p->buflen-save)+p->dbufoffset];
 				p->sbufoffset++;
 			}
 			p->dbufoffset += (MP3_BUFLEN - save);




More information about the asterisk-commits mailing list