Commit 75e85f31 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Solving bug when emptying timeline and adding media again.

MainWorkflow was in unpaused mode, and was rendering though is shouldn't
parent 690a7d7f
......@@ -177,7 +177,6 @@ WorkflowRenderer::lockAudio( qint64 *pts, size_t *bufferSize, void **buffer )
nbSample = renderAudioSample->nbSample;
*buffer = renderAudioSample->buff;
*bufferSize = renderAudioSample->size;
qDebug() << "size:" << renderAudioSample->size;
ptsDiff = renderAudioSample->ptsDiff;
}
else
......@@ -468,9 +467,11 @@ void WorkflowRenderer::__endReached()
void
WorkflowRenderer::mainWorkflowLenghtChanged( qint64 newLength )
{
if ( newLength > 0 && m_isRendering == false )
if ( newLength > 0 )
{
startPreview();
if ( m_isRendering == false )
startPreview();
m_paused = false;
togglePlayPause( true );
}
else if ( newLength == 0 && m_isRendering == true )
......
......@@ -104,7 +104,6 @@ AudioClipWorkflow::AudioSample* AudioClipWorkflow::createBuffer( size_t size
void AudioClipWorkflow::lock( AudioClipWorkflow* cw, quint8** pcm_buffer , unsigned int size )
{
qDebug() << "computing buffer of size: " << size;
QMutexLocker lock( cw->m_availableBuffersMutex );
cw->m_renderLock->lock();
cw->m_computedBuffersMutex->lock();
......
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