Commit f31a26be authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Don't change current frame in paused mode.

parent bfd69f94
......@@ -102,19 +102,22 @@ WorkflowRenderer::~WorkflowRenderer()
int WorkflowRenderer::lock( void *datas, int64_t *dts, int64_t *pts, unsigned int *flags, size_t *bufferSize, void **buffer )
{
int ret = 1;
EsHandler* handler = reinterpret_cast<EsHandler*>( datas );
bool paused = handler->self->m_paused;
EsHandler* handler = reinterpret_cast<EsHandler*>( datas );
*dts = -1;
*flags = 0;
if ( handler->type == Video )
{
ret = handler->self->lockVideo( pts, bufferSize, buffer );
handler->self->m_mainWorkflow->goToNextFrame( MainWorkflow::VideoTrack );
if ( paused == false )
handler->self->m_mainWorkflow->goToNextFrame( MainWorkflow::VideoTrack );
}
else if ( handler->type == Audio )
{
ret = handler->self->lockAudio( pts, bufferSize, buffer );
handler->self->m_mainWorkflow->goToNextFrame( MainWorkflow::AudioTrack );
if ( paused == false )
handler->self->m_mainWorkflow->goToNextFrame( MainWorkflow::AudioTrack );
}
else
qCritical() << "Invalid ES type";
......
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