[tracker] tracker-extract-mp3: avoid deadcode, bitrate will always be greater than 0
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract-mp3: avoid deadcode, bitrate will always be greater than 0
- Date: Thu, 8 Jul 2010 08:08:44 +0000 (UTC)
commit 0fcbb6dd3dd3441102367f1e88ca1c3877c420eb
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Jul 8 10:08:39 2010 +0200
tracker-extract-mp3: avoid deadcode, bitrate will always be greater than 0
src/tracker-extract/tracker-extract-mp3.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 6f5ce94..d1ab435 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -937,8 +937,9 @@ mp3_parse_header (const gchar *data,
if (filedata->duration == 0) {
if ((!vbr_flag && frames > VBR_THRESHOLD) || (frames > MAX_FRAMES_SCAN)) {
- /* If not all frames scanned */
- length = (filedata->size - filedata->id3v2_size) / (avg_bps ? avg_bps : bitrate ? bitrate : 0xFFFFFFFF) / 125;
+ /* If not all frames scanned
+ * Note that bitrate is always > 0, checked before */
+ length = (filedata->size - filedata->id3v2_size) / (avg_bps ? avg_bps : bitrate) / 125;
} else{
length = spfp8 * 8 * frames / (sample_rate ? sample_rate : 0xFFFFFFFF);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]