From 275f2d20a3d2760e6136baf35d57080f852a8760 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 5 May 2017 09:57:48 +0100 Subject: [PATCH] Clear _video/_audio when the seek is request, not when it's performed. Otherwise between the seek request and action there can be a get_video() call which returns "stale" data. --- src/lib/butler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/butler.cc b/src/lib/butler.cc index 48e3a526c..29f168335 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -90,8 +90,6 @@ 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 (); @@ -152,6 +150,8 @@ Butler::seek (DCPTime position, bool accurate) return; } + _video.clear (); + _audio.clear (); _pending_seek_position = position; _pending_seek_accurate = accurate; _summon.notify_all (); -- 2.30.2