From: Carl Hetherington Date: Wed, 26 Apr 2017 10:02:46 +0000 (+0100) Subject: Nicer fix for previous commit. X-Git-Tag: v2.11.1~12 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=8f685eef234cc056750ecb769e9293b6666386bb Nicer fix for previous commit. --- diff --git a/src/lib/butler.cc b/src/lib/butler.cc index 89095613d..48e3a526c 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -90,6 +90,9 @@ try /* Do any seek that has been requested */ if (_pending_seek_position) { + _video.clear (); + _audio.clear (); + _finished = false; _player->seek (*_pending_seek_position, _pending_seek_accurate); _pending_seek_position = optional (); } @@ -102,8 +105,7 @@ try lm.unlock (); bool const r = _player->pass (); lm.lock (); - /* We must check _pending_seek_position again here as it may have been set while lm was unlocked */ - if (r && !_pending_seek_position) { + if (r) { _finished = true; _arrived.notify_all (); break; @@ -150,9 +152,6 @@ Butler::seek (DCPTime position, bool accurate) return; } - _video.clear (); - _audio.clear (); - _finished = false; _pending_seek_position = position; _pending_seek_accurate = accurate; _summon.notify_all ();