audio: log A/V initial sync status

This commit is contained in:
wm4 2019-11-17 01:17:34 +01:00
parent c7487cebd1
commit 23414d1d71
1 changed files with 3 additions and 0 deletions

View File

@ -656,6 +656,9 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip)
}
ptsdiff = MPCLAMP(ptsdiff, -3600, 3600);
MP_VERBOSE(mpctx, "audio sync: sync_to_video=%d, offset=%f\n",
sync_to_video, ptsdiff);
int align = af_format_sample_alignment(ao_format);
*skip = (int)(-ptsdiff * play_samplerate) / align * align;
return true;