Workaround should be for abs.

This commit is contained in:
Johns 2012-03-06 15:39:29 +01:00
parent 129c139ed7
commit 7931909e28

View File

@ -932,7 +932,7 @@ static void CodecAudioSetClock(AudioDecoder * audio_decoder, int64_t pts)
int distance; int distance;
// try workaround for buggy ffmpeg 0.10 // 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); distance = (pts_diff * audio_decoder->HwSampleRate) / (900 * 1000);
} else { } else {
distance = (pts_diff * audio_decoder->HwSampleRate) / (90 * 1000); distance = (pts_diff * audio_decoder->HwSampleRate) / (90 * 1000);