Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix seeking past last clip broken

parent 425648c2
Pipeline #1941 passed with stage
in 20 minutes and 43 seconds
......@@ -753,14 +753,22 @@ bool GLWidget::checkFrameNumber(int pos, int offset)
return true;
}
return true;
} else {
} else if (!qFuzzyIsNull(speed)) {
maxPos -= offset;
if (pos >= (maxPos - 1) || (speed < 0. && pos <= 0)) {
if (pos >= (maxPos - 1) && speed > 0.) {
// Playing past last clip, pause
m_producer->set_speed(0);
m_consumer->set("refresh", 0);
m_consumer->purge();
m_producer->seek(qMax(0, maxPos));
return false;
} else if (pos <= 0 && speed < 0.) {
// rewinding reached 0, pause
m_producer->set_speed(0);
m_consumer->set("refresh", 0);
m_consumer->purge();
m_producer->seek(0);
return false;
}
}
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment