Commit 8a150de7 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ClipWorkflow: Fix a crash when closing the project while rendering.

parent de06b98e
......@@ -34,7 +34,7 @@ AudioClipWorkflow::AudioClipWorkflow( ClipHelper *ch ) :
AudioClipWorkflow::~AudioClipWorkflow()
{
releasePrealocated();
stop();
}
void
......
......@@ -57,9 +57,9 @@ class AudioClipWorkflow : public ClipWorkflow
protected:
virtual quint32 getNbComputedBuffers() const;
virtual quint32 getMaxComputedBuffers() const;
void flushComputedBuffers();
virtual void flushComputedBuffers();
void preallocate();
void releasePrealocated();
virtual void releasePrealocated();
private:
void releaseBuffer( Workflow::AudioSample *sample );
......
......@@ -49,6 +49,7 @@ ClipWorkflow::ClipWorkflow( ClipHelper* ch ) :
ClipWorkflow::~ClipWorkflow()
{
//Don't call stop() method from here, the Vtable is probably already gone.
delete m_renderWaitCond;
delete m_renderLock;
delete m_initWaitCond;
......
......@@ -40,6 +40,11 @@ ImageClipWorkflow::ImageClipWorkflow( ClipHelper *ch ) :
this, SLOT( stopComputation() ), Qt::QueuedConnection );
}
ImageClipWorkflow::~ImageClipWorkflow()
{
stop();
}
void
ImageClipWorkflow::initVlcOutput()
{
......
......@@ -38,6 +38,7 @@ class ImageClipWorkflow : public ClipWorkflow
virtual void release();
};
ImageClipWorkflow( ClipHelper* ch );
~ImageClipWorkflow();
void *getLockCallback() const;
void *getUnlockCallback() const;
......
......@@ -39,7 +39,7 @@ VideoClipWorkflow::VideoClipWorkflow( ClipHelper *ch ) :
VideoClipWorkflow::~VideoClipWorkflow()
{
releasePrealocated();
stop();
}
void
......
......@@ -59,12 +59,12 @@ class VideoClipWorkflow : public ClipWorkflow
virtual quint32 getNbComputedBuffers() const;
virtual quint32 getMaxComputedBuffers() const;
void releaseBuffer( Workflow::Frame* frame );
void flushComputedBuffers();
virtual void flushComputedBuffers();
/**
* \brief Pre-allocate some image buffers.
*/
void preallocate();
void releasePrealocated();
virtual void releasePrealocated();
private:
QQueue<Workflow::Frame*> m_computedBuffers;
......
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