rtoss - Diff between revs 14 and 26

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 14 Rev 26
Line 1... Line 1...
1 /* 1 /*
2  * libmad - MPEG audio decoder library 2  * libmad - MPEG audio decoder library
3  * Copyright (C) 2000-2003 Underbit Technologies, Inc. -  
-   3  * Copyright (C) 2000-2004 Underbit Technologies, Inc.
4  * 4  *
5  * This program is free software; you can redistribute it and/or modify 5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by 6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or 7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version. 8  * (at your option) any later version.
Line 14... Line 14...
14  * 14  *
15  * You should have received a copy of the GNU General Public License 15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software 16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  * 18  *
19  * $Id: frame.c,v 1.26 2003/05/30 20:34:30 rob Exp $ -  
-   19  * $Id: frame.c,v 1.29 2004/02/04 22:59:19 rob Exp $
20  */ 20  */
21 21
22 # ifdef HAVE_CONFIG_H 22 # ifdef HAVE_CONFIG_H
23 #  include "config.h" 23 #  include "config.h"
24 # endif 24 # endif
Line 374... Line 374...
374   mad_timer_set(&header->duration, 0, 374   mad_timer_set(&header->duration, 0,
375                 32 * MAD_NSBSAMPLES(header), header->samplerate); 375                 32 * MAD_NSBSAMPLES(header), header->samplerate);
376 376
377   /* calculate free bit rate */ 377   /* calculate free bit rate */
378   if (header->bitrate == 0) { 378   if (header->bitrate == 0) {
379     if ((stream->freerate == 0 || !stream->sync) && -  
-   379     if ((stream->freerate == 0 || !stream->sync ||
-   380          (header->layer == MAD_LAYER_III && stream->freerate > 640000)) &&
380         free_bitrate(stream, header) == -1) 381         free_bitrate(stream, header) == -1)
381       goto fail; 382       goto fail;
382 383
383     header->bitrate = stream->freerate; 384     header->bitrate = stream->freerate;
384     header->flags  |= MAD_FLAG_FREEFORMAT; 385     header->flags  |= MAD_FLAG_FREEFORMAT;