From 818d31f39863a6acda6d0f37c657ba85339500b1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 15 Dec 2014 10:31:48 +0000 Subject: Hand-apply 75be314ee89fb2f4e783b4079f7fabf69e79d636 from master; fix hidden content appearing (#418). --- src/lib/ffmpeg_decoder.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index e90c33c80..810aa775b 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -97,6 +97,14 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr c, shared_ptr _pts_offset = - c->audio_stream()->first_audio.get(); } + /* If _pts_offset is positive we would be pushing things from a -ve PTS to be played. + I don't think we ever want to do that, as it seems things at -ve PTS are not meant + to be seen (use for alignment bars etc.); see mantis #418. + */ + if (_pts_offset > 0) { + _pts_offset = 0; + } + /* Now adjust both so that the video pts starts on a frame */ if (have_video && have_audio) { ContentTime first_video = c->first_video().get() + _pts_offset; -- cgit v1.2.3