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() ...@@ -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 WorkflowRenderer::lock( void *datas, int64_t *dts, int64_t *pts, unsigned int *flags, size_t *bufferSize, void **buffer )
{ {
int ret = 1; int ret = 1;
EsHandler* handler = reinterpret_cast<EsHandler*>( datas );
bool paused = handler->self->m_paused;
EsHandler* handler = reinterpret_cast<EsHandler*>( datas );
*dts = -1; *dts = -1;
*flags = 0; *flags = 0;
if ( handler->type == Video ) if ( handler->type == Video )
{ {
ret = handler->self->lockVideo( pts, bufferSize, buffer ); 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 ) else if ( handler->type == Audio )
{ {
ret = handler->self->lockAudio( pts, bufferSize, buffer ); 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 else
qCritical() << "Invalid ES type"; 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