From 7f03af08fa16c448927f513774ea2978707ef9c3 Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Thu, 3 Sep 2009 21:14:13 +0000 Subject: Quick fix to allow certain MP3 files to play. If a Xing or Info header didn't properly set both the frame count and byte count, then the bitrate was set to zero, preventing playback. Better to use the bitrate of the first audio frame in this case. (More sanity checking of the frame count should perhaps be done.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22611 a1c6a512-1295-4272-9138-f99709370657 --- apps/mp3data.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/mp3data.c b/apps/mp3data.c index 80870cd8cd..4809708a9c 100644 --- a/apps/mp3data.c +++ b/apps/mp3data.c @@ -449,8 +449,6 @@ int get_mp3file_info(int fd, struct mp3info *info) else info->bitrate = info->byte_count / (info->file_time >> 3); } - else - info->bitrate = 0; if (vbrheader[7] & VBR_TOC_FLAG) /* Is table-of-contents there? */ { -- cgit v1.2.3