Commit 55c7ca2d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix seeking past last clip broken

parent 425648c2
......@@ -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