From ba983cf47c98be684ee6ac1560f55364016b16f8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2020 15:13:35 +0100 Subject: [PATCH] Fix deadlock. --- src/wx/video_view.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wx/video_view.cc b/src/wx/video_view.cc index 4edc2cd23..014524757 100644 --- a/src/wx/video_view.cc +++ b/src/wx/video_view.cc @@ -24,6 +24,7 @@ #include "lib/butler.h" #include +using std::pair; using boost::shared_ptr; using boost::optional; @@ -118,12 +119,12 @@ VideoView::start () bool VideoView::refresh_metadata (shared_ptr film, dcp::Size video_container_size, dcp::Size film_frame_size) { - boost::mutex::scoped_lock lm (_mutex); - if (!_player_video.first) { + pair, dcpomatic::DCPTime> pv = player_video (); + if (!pv.first) { return false; } - if (!_player_video.first->reset_metadata (film, video_container_size, film_frame_size)) { + if (!pv.first->reset_metadata (film, video_container_size, film_frame_size)) { return false; } -- 2.30.2