mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-02-10 14:24:10 +00:00
ffplay: fix nosync threshold check in synchronize_audio
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
da56955621
commit
eaa91ed863
2
ffplay.c
2
ffplay.c
@ -1899,7 +1899,7 @@ static int synchronize_audio(VideoState *is, int nb_samples)
|
|||||||
|
|
||||||
diff = get_audio_clock(is) - get_master_clock(is);
|
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;
|
is->audio_diff_cum = diff + is->audio_diff_avg_coef * is->audio_diff_cum;
|
||||||
if (is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) {
|
if (is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) {
|
||||||
/* not enough measures to have a correct estimate */
|
/* not enough measures to have a correct estimate */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user