Commit 1dfaf298 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VideoClipWorkflow: Don't wait forever when waiting for a frame.

Instead put the clip workflow in error state
parent f3e597ee
......@@ -271,6 +271,8 @@ class ClipWorkflow : public EffectUser
void mediaPlayerPaused();
void mediaPlayerUnpaused();
void resyncClipWorkflow();
protected slots:
void errorEncountered();
signals:
......
......@@ -27,6 +27,7 @@
#include "SettingsManager.h"
#include "VideoClipWorkflow.h"
#include "VLCMedia.h"
#include "VlmcDebug.h"
#include "Workflow/Types.h"
#include <QMutexLocker>
......@@ -131,7 +132,12 @@ VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame )
return NULL;
if ( getNbComputedBuffers() == 0 )
{
m_renderWaitCond->wait( m_renderLock );
if ( m_renderWaitCond->wait( m_renderLock, 50 ) == false )
{
vlmcWarning() << "Clip workflow" << m_clipHelper->uuid() << "Timed out while waiting for a frame";
errorEncountered();
return NULL;
}
if ( shouldRender() == false )
return NULL;
}
......
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