diff options
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 11 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2014-01-21 Carl Hetherington <cth@carlh.net> + + * Potentially major fix for bad A/V sync. + 2014-01-19 Carl Hetherington <cth@carlh.net> * Version 1.63.4 released. diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index b95570f5c..c3709166e 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -322,7 +322,16 @@ FFmpegDecoder::seek (VideoContent::Frame frame, bool accurate) avcodec_flush_buffers (_subtitle_codec_context); } - _just_sought = true; + /* This !accurate is piling hack upon hack; setting _just_sought to true + even with accurate == true defeats our attempt to align the start + of the video and audio. Here we disable that defeat when accurate == true + i.e. when we are making a DCP rather than just previewing one. + Ewww. This should be gone in 2.0. + */ + if (!accurate) { + _just_sought = true; + } + _video_position = frame; if (frame == 0 || !accurate) { |
