[xiph-cvs] cvs commit: ices/src mp3.c

Brendan brendan at xiph.org
Sun Jul 6 11:26:47 PDT 2003



brendan     03/07/06 14:26:47

  Modified:    src      mp3.c
  Log:
  I was too lazy in my last frame length patch.

Revision  Changes    Path
1.35      +4 -4      ices/src/mp3.c

Index: mp3.c
===================================================================
RCS file: /cvs/ice/ices/src/mp3.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -u -r1.34 -r1.35
--- mp3.c	3 Jul 2003 13:06:22 -0000	1.34
+++ mp3.c	6 Jul 2003 18:26:47 -0000	1.35
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: mp3.c,v 1.34 2003/07/03 13:06:22 brendan Exp $
+ * $Id: mp3.c,v 1.35 2003/07/06 18:26:47 brendan Exp $
  */
 
 #include "definitions.h"
@@ -504,9 +504,9 @@ static size_t mp3_frame_length(mp3_heade
 
   if (header->layer == 1) {
     return (12000 * header->bitrate / header->samplerate + header->padding) * 4;
-  } else {
-    return 144000 * header->bitrate / (header->samplerate << header->version) + header->padding;
+  } else if (header->layer ==3 && header->version > 0) { 
+    return 72000 * header->bitrate / header->samplerate + header->padding;
   }
 
-  return 0;
+  return 144000 * header->bitrate / header->samplerate + header->padding;
 }

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list