From f72c2b93c5d3bd77eb35cc3adfc9cf99281bcb18 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 5 May 2021 17:11:02 +0200 Subject: [PATCH] Fix video-monitor display when seeking see also 25c0bd9274c541426eb3232b7b697aa3b69f2960 play, locate, play resulted in the video-monitor showing the target frame shortly, and play a few frames from the old location. This was due to locate happening async. Click to locate directly sends the new location: ``` VideoTimeLine::manual_seek_video_monitor ARDOUR_UI::update_transport_clocks CursorDrag::fake_locate CursorDrag::start_grab DragManager::start_grab ``` CursorDrag::finished unset _dragging_playhead before the call to resuest_locate(). Meanwhile playback continues. --- gtk2_ardour/video_monitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc index 38a5a08177..78c90d61fb 100644 --- a/gtk2_ardour/video_monitor.cc +++ b/gtk2_ardour/video_monitor.cc @@ -482,8 +482,8 @@ VideoMonitor::get_custom_setting (const std::string k) void VideoMonitor::srsupdate () { - if (!_session) { return; } - if (editor->dragging_playhead() || editor->preview_video_drag_active()) { + if (!_session || _session->locate_initiated ()) { return; } + if (editor->dragging_playhead() || editor->preview_video_drag_active() || editor->pending_locate_request ()) { return; } manual_seek(_session->audible_sample(), false, NO_OFFSET);