summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-10-22 12:18:31 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-10-22 17:07:11 -0400
commitaa0effb4cb38f4c3a06564bd9e6a0ee516d4f958 (patch)
treeb28503e0c1cb26976ac5ad63751a33942b9e6f2b /libs
parent5ff0c6b319ef89deaeeb1a2cb387ec159df85172 (diff)
ignore negative value locates and MMC locate commands
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_transport.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 3e853a5005..6954bd0288 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -865,6 +865,11 @@ Session::flush_all_inserts ()
void
Session::start_locate (framepos_t target_frame, bool with_roll, bool with_flush, bool with_loop, bool force)
{
+ if (target_frame < 0) {
+ error << _("Locate called for negative sample position - ignored") << endmsg;
+ return;
+ }
+
if (synced_to_engine()) {
double sp;
@@ -1747,6 +1752,10 @@ Session::maybe_stop (framepos_t limit)
void
Session::send_mmc_locate (framepos_t t)
{
+ if (t < 0) {
+ return;
+ }
+
if (!_engine.freewheeling()) {
Timecode::Time time;
timecode_time_subframes (t, time);