diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-04-13 05:51:03 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-04-13 05:51:03 +0000 |
commit | 4359058c79187bb8c3d41328f46a730f3eb113ac (patch) | |
tree | d7486c9547124fd3800c6e88a8c256b5140ed6a6 /apps/mp3data.c | |
parent | 77268ec48f904636ccaf985732b61df77af2abe8 (diff) | |
download | rockbox-4359058c79187bb8c3d41328f46a730f3eb113ac.tar.gz rockbox-4359058c79187bb8c3d41328f46a730f3eb113ac.zip |
Fix the Xing header parser to have reliable gapless playback. Closes FS#12062.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29708 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/mp3data.c')
-rw-r--r-- | apps/mp3data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/mp3data.c b/apps/mp3data.c index 697797279e..9fed727609 100644 --- a/apps/mp3data.c +++ b/apps/mp3data.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "buffer.h" | 41 | #include "buffer.h" |
42 | #include "system.h" | 42 | #include "system.h" |
43 | 43 | ||
44 | // #define DEBUG_VERBOSE | 44 | //#define DEBUG_VERBOSE |
45 | 45 | ||
46 | #ifdef DEBUG_VERBOSE | 46 | #ifdef DEBUG_VERBOSE |
47 | #define VDEBUGF DEBUGF | 47 | #define VDEBUGF DEBUGF |
@@ -452,7 +452,7 @@ static void get_xing_info(struct mp3info *info, unsigned char *buf) | |||
452 | #if CONFIG_CODEC==SWCODEC | 452 | #if CONFIG_CODEC==SWCODEC |
453 | i += 21; | 453 | i += 21; |
454 | info->enc_delay = ((int)buf[i ] << 4) | (buf[i+1] >> 4); | 454 | info->enc_delay = ((int)buf[i ] << 4) | (buf[i+1] >> 4); |
455 | info->enc_padding = ((int)buf[i+1] << 8) | buf[i+2]; | 455 | info->enc_padding = ((int)(buf[i+1]&0xF) << 8) | buf[i+2]; |
456 | /* TODO: This sanity checking is rather silly, seeing as how the LAME | 456 | /* TODO: This sanity checking is rather silly, seeing as how the LAME |
457 | header contains a CRC field that can be used to verify integrity. */ | 457 | header contains a CRC field that can be used to verify integrity. */ |
458 | if (!(info->enc_delay >= 0 && info->enc_delay <= 2880 && | 458 | if (!(info->enc_delay >= 0 && info->enc_delay <= 2880 && |