diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2007-07-11 01:20:31 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2007-07-11 01:20:31 +0000 |
commit | 00b16fab6c972fa45c46c56521adb7c1c79d0490 (patch) | |
tree | 60d34a71447671e935e592e08c24c5bf93e85655 | |
parent | 39c56b3f17ed91fc6e57f1569a5dd9803b36fdf5 (diff) | |
download | rockbox-00b16fab6c972fa45c46c56521adb7c1c79d0490.tar.gz rockbox-00b16fab6c972fa45c46c56521adb7c1c79d0490.zip |
Ancient ffmpeg bug fix that should never have been missed. Prevents floating point value from truncating downward. My files are byte for byte identical with this fix, but the ffmpeg mailing list claims its important.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13846 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 1a7081fd29..3a4e70dc15 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -624,7 +624,8 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
624 | bps = fixdiv64(tmp, tmp2); | 624 | bps = fixdiv64(tmp, tmp2); |
625 | fixed64 tim = fixmul64byfixed(bps, s->frame_len); | 625 | fixed64 tim = fixmul64byfixed(bps, s->frame_len); |
626 | fixed64 tmpi = fixdiv64(tim,itofix64(8)); | 626 | fixed64 tmpi = fixdiv64(tim,itofix64(8)); |
627 | s->byte_offset_bits = av_log2(fixtoi64(tmpi)) + 2; | 627 | s->byte_offset_bits = av_log2(fixtoi64(tmpi+0x8000)) + 2; |
628 | |||
628 | 629 | ||
629 | /* compute high frequency value and choose if noise coding should | 630 | /* compute high frequency value and choose if noise coding should |
630 | be activated */ | 631 | be activated */ |
@@ -1706,7 +1707,7 @@ int wma_decode_superframe_init(WMADecodeContext* s, | |||
1706 | 1707 | ||
1707 | 1708 | ||
1708 | /* Decode a single frame in the current superframe - return -1 if | 1709 | /* Decode a single frame in the current superframe - return -1 if |
1709 | there was a decoding error, or the number of samples decoded. | 1710 | there was a decoding error, or the number of samples decoded. |
1710 | */ | 1711 | */ |
1711 | 1712 | ||
1712 | int wma_decode_superframe_frame(WMADecodeContext* s, | 1713 | int wma_decode_superframe_frame(WMADecodeContext* s, |