diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-16 11:25:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-16 11:25:45 +0100 |
| commit | d474df7f2f8c01ece7ded039fe4c926555677dc4 (patch) | |
| tree | 671fef99690cdb169c10b1f1c8d0d5953d7cfe48 /src/lib | |
| parent | 8142f2bc2e9cf757cb94753b1dda8f25b0ebaa22 (diff) | |
Fix failure to fill FFmpeg gaps at the start of films.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 2fc062bb5..ad21bb9f1 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -670,9 +670,16 @@ Player::video (weak_ptr<Piece> wp, ContentVideo video) as in the problematic case we are about to emit a frame which is not contiguous with the previous. */ + optional<DCPTime> fill_to; if (_last_video_time) { + fill_to = _last_video_time; + } else if (_last_seek_time && _last_seek_accurate) { + fill_to = _last_seek_time; + } + + if (fill_to) { /* XXX: this may not work for 3D */ - BOOST_FOREACH (DCPTimePeriod i, subtract(DCPTimePeriod (*_last_video_time, time), _no_video)) { + BOOST_FOREACH (DCPTimePeriod i, subtract(DCPTimePeriod (*fill_to, time), _no_video)) { for (DCPTime j = i.from; j < i.to; j += one_video_frame()) { if (_last_video) { emit_video (shared_ptr<PlayerVideo> (new PlayerVideo (*_last_video)), j); |
