Skip to content

Commit

Permalink
Avoid using abs for floating point check in postprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Oct 27, 2023
1 parent 9de4c13 commit 25dc7f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/postprocessing/janus-pp-rec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) {
JANUS_LOG(LOG_INFO, "Counted %"SCNu32" frame packets\n", count);
if(!data && !video) {
double diff = ts - pts;
if(abs(diff) > 0.5) {
if(diff < -0.5 || diff > 0.5 ) { {
JANUS_LOG(LOG_WARN, "Detected audio clock mismatch, consider using skew compensation or restamping (rtp_time=%.2fs, real_time=%.2fs, diff=%.2fs)\n", ts, pts, diff);
}
}
Expand Down

0 comments on commit 25dc7f8

Please sign in to comment.