Commit 52e59020 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Fix audio behaviour in pause mode

Removed useless attribute from workflow renderer
parent 9f63d1c2
......@@ -133,8 +133,11 @@ WorkflowRenderer::lockVideo( qint64 *pts, size_t *bufferSize, void **buffer )
if ( m_stopping == false && m_paused == false )
{
MainWorkflow::OutputBuffers* ret = m_mainWorkflow->getOutput( MainWorkflow::VideoTrack );
memcpy( m_renderVideoFrame, (*(ret->video))->frame.octets, (*(ret->video))->nboctets );
MainWorkflow::OutputBuffers* ret =
m_mainWorkflow->getOutput( MainWorkflow::VideoTrack );
memcpy( m_renderVideoFrame,
(*(ret->video))->frame.octets,
(*(ret->video))->nboctets );
m_videoBuffSize = (*(ret->video))->nboctets;
ptsDiff = (*(ret->video))->ptsDiff;
}
......@@ -154,20 +157,23 @@ WorkflowRenderer::lockVideo( qint64 *pts, size_t *bufferSize, void **buffer )
int
WorkflowRenderer::lockAudio( qint64 *pts, size_t *bufferSize, void **buffer )
{
qint64 ptsDiff;
qint64 ptsDiff;
uint32_t nbSample;
AudioClipWorkflow::AudioSample *renderAudioSample;
if ( m_stopping == false )
if ( m_stopping == false && m_paused == false )
{
MainWorkflow::OutputBuffers* ret = m_mainWorkflow->getOutput( MainWorkflow::AudioTrack );
m_renderAudioSample = ret->audio;
renderAudioSample = ret->audio;
}
uint32_t nbSample;
if ( m_renderAudioSample != NULL )
else
renderAudioSample = NULL;
if ( renderAudioSample != NULL )
{
nbSample = m_renderAudioSample->nbSample;
*buffer = m_renderAudioSample->buff;
*bufferSize = m_renderAudioSample->size;
ptsDiff = m_renderAudioSample->ptsDiff;
nbSample = renderAudioSample->nbSample;
*buffer = renderAudioSample->buff;
*bufferSize = renderAudioSample->size;
ptsDiff = renderAudioSample->ptsDiff;
}
else
{
......
......@@ -317,7 +317,6 @@ class WorkflowRenderer : public GenericRenderer
*/
static uint8_t* silencedAudioBuffer;
size_t m_videoBuffSize;
AudioClipWorkflow::AudioSample* m_renderAudioSample;
Action::Stack m_actions;
QMutex* m_actionsMutex;
QWaitCondition* m_waitCond;
......
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