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

Brendan brendan at xiph.org
Wed Jul 2 21:41:32 PDT 2003



brendan     03/07/03 00:41:32

  Modified:    src      mp3.c
  Log:
  LSF frames are half length.

Revision  Changes    Path
1.33      +2 -2      ices/src/mp3.c

Index: mp3.c
===================================================================
RCS file: /cvs/ice/ices/src/mp3.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -u -r1.32 -r1.33
--- mp3.c	19 Mar 2003 18:58:24 -0000	1.32
+++ mp3.c	3 Jul 2003 04:41:32 -0000	1.33
@@ -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.32 2003/03/19 18:58:24 brendan Exp $
+ * $Id: mp3.c,v 1.33 2003/07/03 04:41:32 brendan Exp $
  */
 
 #include "definitions.h"
@@ -505,7 +505,7 @@ 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->padding;
+    return 144000 * header->bitrate / (header->samplerate << header->version) + header->padding;
   }
 
   return 0;

<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