aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-10-06 13:31:07 +0200
committerMarton Balint <cus@passwd.hu>2012-10-21 17:18:12 +0200
commiteaa91ed863a72c71553c913f17c3bf2e70a11271 (patch)
treedc1797575cf677b439c242f303a9165f710b6a70
parentda569556217f185830ba7412355f681a6b62f1f0 (diff)
downloadffmpeg-eaa91ed863a72c71553c913f17c3bf2e70a11271.tar.gz
ffplay: fix nosync threshold check in synchronize_audio
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--ffplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index b3b09b3905..5c5126b48e 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1899,7 +1899,7 @@ static int synchronize_audio(VideoState *is, int nb_samples)
diff = get_audio_clock(is) - get_master_clock(is);
- if (diff < AV_NOSYNC_THRESHOLD) {
+ if (fabs(diff) < AV_NOSYNC_THRESHOLD) {
is->audio_diff_cum = diff + is->audio_diff_avg_coef * is->audio_diff_cum;
if (is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) {
/* not enough measures to have a correct estimate */