[svn-commits] russell: branch 1.4 r1027 - /branches/1.4/formats/format_mp3.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 8 13:03:33 CDT 2009


Author: russell
Date: Tue Sep  8 13:03:29 2009
New Revision: 1027

URL: http://svn.asterisk.org/svn-view/asterisk-addons?view=rev&rev=1027
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:
    branches/1.4/formats/format_mp3.c

Modified: branches/1.4/formats/format_mp3.c
URL: http://svn.asterisk.org/svn-view/asterisk-addons/branches/1.4/formats/format_mp3.c?view=diff&rev=1027&r1=1026&r2=1027
==============================================================================
--- branches/1.4/formats/format_mp3.c (original)
+++ branches/1.4/formats/format_mp3.c Tue Sep  8 13:03:29 2009
@@ -203,7 +203,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;
@@ -214,7 +214,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 svn-commits mailing list