1
0
Fork 0
forked from len0rd/rockbox

Fix (another) overflow when seeking in long WMA files.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16597 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Giacomelli 2008-03-09 23:38:11 +00:00
parent c7052c341c
commit afd5c6a03f

View file

@ -403,7 +403,7 @@ static int seek(int ms, asf_waveformatex_t* wfx)
/*estimate packet number from bitrate*/
int initial_packet = ci->curpos/wfx->packet_size;
int packet_num = (ms*(wfx->bitrate>>3))/wfx->packet_size/1000;
int packet_num = (((int64_t)ms)*(wfx->bitrate>>3))/wfx->packet_size/1000;
int last_packet = ci->id3->filesize / wfx->packet_size;
if (packet_num > last_packet) {