Fixed integer rollover bug in toxav.

This commit is contained in:
irungentoo 2014-11-25 17:22:44 -05:00
parent 89f2436fac
commit 6e361a52fb
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -151,7 +151,11 @@ uint32_t toxav_do_interval(ToxAv *av)
rc = MIN(av->calls[i].cs->audio_decoder_frame_duration, rc);
}
return rc - av->avgdectms;
if (rc < av->avgdectms) {
return 0;
} else {
return rc - av->avgdectms;
}
}
void toxav_do(ToxAv *av)