From 52094ba65baa38dfcedc907cfb4314efb1a549b4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Aug 2018 00:01:49 +0100 Subject: [PATCH] Remove duplicated stuff from seek_unlocked(); tweak some ordering. --- src/lib/butler.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib/butler.cc b/src/lib/butler.cc index 45cd5a9db..882d8bf58 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -225,6 +225,10 @@ Butler::seek_unlocked (DCPTime position, bool accurate) return; } + _finished = false; + _pending_seek_position = position; + _pending_seek_accurate = accurate; + { boost::mutex::scoped_lock lm (_buffers_mutex); _video.clear (); @@ -232,9 +236,6 @@ Butler::seek_unlocked (DCPTime position, bool accurate) _closed_caption.clear (); } - _finished = false; - _pending_seek_position = position; - _pending_seek_accurate = accurate; _summon.notify_all (); } @@ -326,16 +327,6 @@ Butler::player_changed () seek_to = next; } - { - boost::mutex::scoped_lock lm (_buffers_mutex); - _video.clear (); - _audio.clear (); - _closed_caption.clear (); - } - - _finished = false; - _summon.notify_all (); - seek_unlocked (seek_to, true); _awaiting = seek_to; } -- 2.30.2