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:
parent
c7052c341c
commit
afd5c6a03f
1 changed files with 1 additions and 1 deletions
|
@ -403,7 +403,7 @@ static int seek(int ms, asf_waveformatex_t* wfx)
|
||||||
|
|
||||||
/*estimate packet number from bitrate*/
|
/*estimate packet number from bitrate*/
|
||||||
int initial_packet = ci->curpos/wfx->packet_size;
|
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;
|
int last_packet = ci->id3->filesize / wfx->packet_size;
|
||||||
|
|
||||||
if (packet_num > last_packet) {
|
if (packet_num > last_packet) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue