diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2009-09-03 21:14:13 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2009-09-03 21:14:13 +0000 |
commit | 7f03af08fa16c448927f513774ea2978707ef9c3 (patch) | |
tree | 992d8b4b6d5a32a2fd5f3dc8713d97d44f99f312 | |
parent | af2dcbb8e1cdce2a06c891db189dbd7e38d77dc4 (diff) | |
download | rockbox-7f03af08fa16c448927f513774ea2978707ef9c3.tar.gz rockbox-7f03af08fa16c448927f513774ea2978707ef9c3.zip |
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
-rw-r--r-- | apps/mp3data.c | 2 |
1 files changed, 0 insertions, 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) | |||
449 | else | 449 | else |
450 | info->bitrate = info->byte_count / (info->file_time >> 3); | 450 | info->bitrate = info->byte_count / (info->file_time >> 3); |
451 | } | 451 | } |
452 | else | ||
453 | info->bitrate = 0; | ||
454 | 452 | ||
455 | if (vbrheader[7] & VBR_TOC_FLAG) /* Is table-of-contents there? */ | 453 | if (vbrheader[7] & VBR_TOC_FLAG) /* Is table-of-contents there? */ |
456 | { | 454 | { |