diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2008-03-09 23:38:11 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-03-09 23:38:11 +0000 |
commit | afd5c6a03f7b95db6d43f78b515901e74ccf15da (patch) | |
tree | c47dab6493b49da1261dc19e46706d43815a07dc /apps/codecs | |
parent | c7052c341c71f90013676b2b4227b73ef9549264 (diff) | |
download | rockbox-afd5c6a03f7b95db6d43f78b515901e74ccf15da.tar.gz rockbox-afd5c6a03f7b95db6d43f78b515901e74ccf15da.zip |
Fix (another) overflow when seeking in long WMA files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16597 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/wma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c index 03b000686c..80797df064 100644 --- a/apps/codecs/wma.c +++ b/apps/codecs/wma.c | |||
@@ -403,7 +403,7 @@ static int seek(int ms, asf_waveformatex_t* wfx) | |||
403 | 403 | ||
404 | /*estimate packet number from bitrate*/ | 404 | /*estimate packet number from bitrate*/ |
405 | int initial_packet = ci->curpos/wfx->packet_size; | 405 | int initial_packet = ci->curpos/wfx->packet_size; |
406 | int packet_num = (ms*(wfx->bitrate>>3))/wfx->packet_size/1000; | 406 | int packet_num = (((int64_t)ms)*(wfx->bitrate>>3))/wfx->packet_size/1000; |
407 | int last_packet = ci->id3->filesize / wfx->packet_size; | 407 | int last_packet = ci->id3->filesize / wfx->packet_size; |
408 | 408 | ||
409 | if (packet_num > last_packet) { | 409 | if (packet_num > last_packet) { |