Only call non_realtime_locate() when locating

`butler_transport_work()` may be called for various reasons,
notably PostTransportOverWrite. At that point in time the
transport may still be rolling or stopping with rtloc already
set.

This can cause DR::Underruns since seek clear the entire
disk reader buffer.
This commit is contained in:
Robin Gareus
2024-09-26 03:44:09 +02:00
parent 4f33105ae0
commit 180e90b81a

View File

@@ -1203,9 +1203,11 @@ Session::butler_transport_work (bool have_process_lock)
}
}
if (will_locate) {
if (will_locate && transport_locating ()) {
DEBUG_TRACE (DEBUG::Butler, string_compose ("nonrealtime locate invoked from BTW (butler has done %1, rtlocs %2)\n", butler, rtlocates));
non_realtime_locate ();
} else if (will_locate) {
DEBUG_TRACE (DEBUG::Butler, string_compose ("skip nonrealtime locate (butler has done %1, rtlocs %2) ts = %3\n", butler, rtlocates, _transport_fsm->current_state()));
}
if (ptw & PostTransportOverWrite) {