Merge pull request #38 from geron-cn/patch-1

fix audio play error in sample alffplay
This commit is contained in:
kcat 2016-04-22 02:57:50 -07:00
commit 1c736f4eb9

View File

@ -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;