From 5c5da23c412e9b922154f8934e16f3a51ff48bdc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 16 Sep 2024 12:38:06 +0200 Subject: Increase tolerance for audio timestamp error. This makes a seemingly valid file that I was sent play properly. --- src/lib/audio_decoder.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/audio_decoder.cc') diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc index dbed0a406..60b0f07ad 100644 --- a/src/lib/audio_decoder.cc +++ b/src/lib/audio_decoder.cc @@ -64,9 +64,10 @@ AudioDecoder::emit(shared_ptr film, AudioStreamPtr stream, shared_pt } /* Amount of error we will tolerate on audio timestamps; see comment below. - * We'll use 1 24fps video frame as this seems to be roughly how ffplay does it. + * ffplay seems to use 1 24fps video frame, but I was sent a file that played + * fine in VLC but not here until the slack was increased to 4 frames @ 24fps. */ - Frame const slack_frames = resampled_rate / 24; + Frame const slack_frames = 4 * resampled_rate / 24; /* first_since_seek is set to true if this is the first data we have received since initialisation or seek. We'll set the position based -- cgit v1.2.3