Commit 22dc6a7e authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix play zone seeking to first frame of timeline

parent 803fcbee
Pipeline #159082 passed with stage
in 9 minutes
......@@ -679,7 +679,7 @@ void GLWidget::refresh()
}
}
bool GLWidget::checkFrameNumber(int pos, int offset, bool isPlaying)
bool GLWidget::checkFrameNumber(int pos, bool isPlaying)
{
const double speed = m_producer->get_speed();
m_proxy->positionFromConsumer(pos, isPlaying);
......@@ -687,6 +687,8 @@ bool GLWidget::checkFrameNumber(int pos, int offset, bool isPlaying)
if (isPlaying && pos >= m_loopOut) {
m_consumer->purge();
if (!m_isLoopMode) {
// end play zone mode
m_isZoneMode = false;
m_producer->set_speed(0);
m_proxy->setSpeed(0);
m_consumer->set("refresh", 0);
......
......@@ -99,7 +99,7 @@ public:
void releaseMonitor();
int droppedFrames() const;
void resetDrops();
bool checkFrameNumber(int pos, int offset, bool isPlaying);
bool checkFrameNumber(int pos, bool isPlaying);
/** @brief Return current timeline position */
int getCurrentPos() const;
/** @brief Requests a monitor refresh */
......
......@@ -2136,7 +2136,7 @@ void Monitor::updateAudioForAnalysis()
void Monitor::onFrameDisplayed(const SharedFrame &frame)
{
if (!m_glMonitor->checkFrameNumber(frame.get_position(), m_offset, m_playAction->isActive())) {
if (!m_glMonitor->checkFrameNumber(frame.get_position(), m_playAction->isActive())) {
updatePlayAction(false);
}
emit m_monitorManager->frameDisplayed(frame);
......
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