summaryrefslogtreecommitdiff
path: root/codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'codec.c')
-rw-r--r--codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/codec.c b/codec.c
index 73776ff..8585862 100644
--- a/codec.c
+++ b/codec.c
@@ -932,7 +932,7 @@ static void CodecAudioSetClock(AudioDecoder * audio_decoder, int64_t pts)
int distance;
// try workaround for buggy ffmpeg 0.10
- if (audio_decoder->DriftCorr < 2000) {
+ if (abs(audio_decoder->DriftCorr) < 2000) {
distance = (pts_diff * audio_decoder->HwSampleRate) / (900 * 1000);
} else {
distance = (pts_diff * audio_decoder->HwSampleRate) / (90 * 1000);