[asterisk-addons-commits] russell: branch 1.6.1 r1029 -	/branches/1.6.1/formats/format_mp3.c
    SVN commits to the Asterisk addons project 
    asterisk-addons-commits at lists.digium.com
       
    Tue Sep  8 13:05:24 CDT 2009
    
    
  
Author: russell
Date: Tue Sep  8 13:05:22 2009
New Revision: 1029
URL: http://svn.asterisk.org/svn-view/asterisk-addons?view=rev&rev=1029
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.6.1/formats/format_mp3.c
Modified: branches/1.6.1/formats/format_mp3.c
URL: http://svn.asterisk.org/svn-view/asterisk-addons/branches/1.6.1/formats/format_mp3.c?view=diff&rev=1029&r1=1028&r2=1029
==============================================================================
--- branches/1.6.1/formats/format_mp3.c (original)
+++ branches/1.6.1/formats/format_mp3.c Tue Sep  8 13:05:22 2009
@@ -196,7 +196,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;
@@ -207,7 +207,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-addons-commits
mailing list