Commit 5980ad00 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Fixed audio gap when rendering.

parent 1dd6dbc5
......@@ -79,6 +79,9 @@ void WorkflowFileRenderer::run()
m_isRendering = true;
m_stopping = false;
m_paused = false;
m_pts = 0;
m_audioPts = 0;
m_mainWorkflow->setFullSpeedRender( true );
m_mainWorkflow->startRender();
......
......@@ -214,6 +214,12 @@ class WorkflowRenderer : public GenericRenderer
bool m_stopping;
float m_outputFps;
unsigned char* m_renderVideoFrame;
/**
* \brief This isn't exactly the current PTS.
* It's the number of frame rendered since the render has started.
*/
qint64 m_pts;
qint64 m_audioPts;
private:
/**
......@@ -224,12 +230,6 @@ class WorkflowRenderer : public GenericRenderer
size_t m_videoBuffSize;
EsHandler* m_videoEsHandler;
EsHandler* m_audioEsHandler;
/**
* \brief This isn't exactly the current PTS.
* It's the number of frame rendered since the render has started.
*/
qint64 m_pts;
qint64 m_audioPts;
quint32 m_nbChannels;
quint32 m_rate;
/**
......
......@@ -142,9 +142,8 @@ void ClipWorkflow::stop()
void
ClipWorkflow::setTime( qint64 time )
{
connect( m_mediaPlayer, SIGNAL( timeChanged(qint64) ),
this, SLOT( resyncClipWorkflow() ), Qt::DirectConnection );
m_mediaPlayer->setTime( time );
resyncClipWorkflow();
QWriteLocker lock( m_stateLock );
if ( m_state == ClipWorkflow::Paused )
{
......@@ -268,8 +267,6 @@ void ClipWorkflow::mediaPlayerUnpaused()
void ClipWorkflow::resyncClipWorkflow()
{
disconnect( m_mediaPlayer, SIGNAL( timeChanged(qint64) ),
this, SLOT( resyncClipWorkflow() ) );
flushComputedBuffers();
m_previousPts = -1;
m_currentPts = -1;
......
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