From cec03f39ae551d68b85f6fd4fb99c00a4f7d759d Mon Sep 17 00:00:00 2001 From: gero Date: Fri, 22 Apr 2016 17:33:00 +0800 Subject: fix audio play error in sample fix audio play error in sample --- examples/alffplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/alffplay.c') diff --git a/examples/alffplay.c b/examples/alffplay.c index ab67d216..7feaa5ae 100644 --- a/examples/alffplay.c +++ b/examples/alffplay.c @@ -350,7 +350,7 @@ static int synchronize_audio(MovieState *movState) ref_clock = get_master_clock(movState); diff = ref_clock - get_audio_clock(&movState->audio); - if(!(diff < AV_NOSYNC_THRESHOLD)) + if(!(fabs(diff) < AV_NOSYNC_THRESHOLD)) { /* Difference is TOO big; reset diff stuff */ movState->audio.diff_accum = 0.0; -- cgit v1.2.3