diff options
author | wm4 <wm4@nowhere> | 2015-10-19 23:43:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-19 23:44:50 +0200 |
commit | b0b67cdf5d0979aaadda737d648826426f32e603 (patch) | |
tree | 0a9e697960db5292e0c5b87a1443aea6fbbfa10b /player | |
parent | 50f8548b2f11a20cac2b55f6408b3cc4fe5df239 (diff) | |
download | mpv-b0b67cdf5d0979aaadda737d648826426f32e603.tar.bz2 mpv-b0b67cdf5d0979aaadda737d648826426f32e603.tar.xz |
player: do not use copysign()
Apparently this function caused weird problems to me. I have no idea
why. The usage of the function looks perfectly fine to me, and even
rounding issues can be excluded. In any case, getting rid of this solved
my problem, and makes the code actually more readable.
Diffstat (limited to 'player')
-rw-r--r-- | player/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index 595265dc74..5b3ef0a783 100644 --- a/player/video.c +++ b/player/video.c @@ -986,7 +986,7 @@ static void handle_display_sync_frame(struct MPContext *mpctx, if (av_diff * -mpctx->display_sync_drift_dir >= 0) new = 0; if (fabs(av_diff) > max_drift) - new = copysign(1, av_diff); + new = av_diff >= 0 ? 1 : -1; if (mpctx->display_sync_drift_dir != new) { MP_VERBOSE(mpctx, "Change display sync audio drift: %d\n", new); mpctx->display_sync_drift_dir = new; |