summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad/frame.c
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/libmad/frame.c') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/libmad/frame.c b/core/multimedia/opieplayer/libmad/frame.c
index 4ebb80c..bf15e7f 100644
--- a/core/multimedia/opieplayer/libmad/frame.c
+++ b/core/multimedia/opieplayer/libmad/frame.c
@@ -1,14 +1,14 @@
/*
- * mad - MPEG audio decoder
+ * libmad - MPEG audio decoder library
* Copyright (C) 2000-2001 Robert Leslie
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
@@ -364,25 +364,25 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
mad_bit_init(&stream->ptr, stream->this_frame);
if (decode_header(header, stream) == -1)
goto fail;
/* calculate frame duration */
mad_timer_set(&header->duration, 0,
32 * MAD_NSBSAMPLES(header), header->samplerate);
/* calculate free bit rate */
if (header->bitrate == 0) {
- if ((!stream->sync || !stream->freerate) &&
+ if ((stream->freerate == 0 || !stream->sync) &&
free_bitrate(stream, header) == -1)
goto fail;
header->bitrate = stream->freerate;
header->flags |= MAD_FLAG_FREEFORMAT;
}
/* calculate beginning of next frame */
pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
if (header->layer == MAD_LAYER_I)
N = ((12 * header->bitrate / header->samplerate) + pad_slot) * 4;