summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-21 22:47:02 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-21 22:47:02 +0000
commit2e0283e334b77873b2244cef39ac2fb362dd7836 (patch)
treeecd79c301e66cb8eb3a0379c7a50e79a2441901c /src/lib/ffmpeg_decoder.cc
parent102961229ac413e072d91a2929489a5e1450aa73 (diff)
Fix bad A/V sync in some (and maybe lots) of circumstances.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc11
1 files changed, 10 insertions, 1 deletions
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) {