1
0
Fork 0
forked from len0rd/rockbox

codecs: abs() --> llabs() in speex and libgme

We were calling abs() on 64-bit (ie long long) variables.

Change-Id: I8326910a4ce733e9e2251aa5f9047e336c8be6df
This commit is contained in:
Solomon Peachy 2024-10-12 11:57:25 -04:00
parent 8dc42711b4
commit d4d74fda00
2 changed files with 6 additions and 6 deletions

View file

@ -201,11 +201,11 @@ static int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos,
spx_int64_t avgpagelen = -1;
spx_int64_t lastgranule = -1;
if(abs(pos-curpos)>10000 && headerssize>0 && curoffset-headerssize>10000) {
if(llabs(pos-curpos)>10000 && headerssize>0 && curoffset-headerssize>10000) {
/* if seeking for more that 10sec,
headersize is known & more than 10kb is played,
try to guess a place to seek from the number of
bytes playe for this position, this works best when
bytes playe for this position, this works best when
the bitrate is relativly constant.
*/