From 8798bfab1539c3ac6031bb325e1b181c58b13fc5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 29 Nov 2020 00:51:38 +0100 Subject: Obey audio timestamps if they don't deviate by more than some threshold. Previously we would ignore audio timestamps because they are not contiguous in a sample-accurate way. However with bugs like #1833 we do need to obey large discontinuities in audio timestamps, otherwise we get large sync errors. Here we change timestamp handling to ignore small discontinuities in timestamps but not larger ones. --- src/lib/ffmpeg_decoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 41b93dad7..0d6539061 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -145,7 +145,7 @@ FFmpegDecoder::flush () ContentTime to_do = min (full_length - a, ContentTime::from_seconds (0.1)); shared_ptr silence (new AudioBuffers (i->channels(), to_do.frames_ceil (i->frame_rate()))); silence->make_silent (); - audio->emit (film(), i, silence, a); + audio->emit (film(), i, silence, a, true); a += to_do; } } -- cgit v1.2.3