[vlmc-devel] commit: VideoClipWorkflow: Race condition work around. ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sat Mar 27 16:10:26 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sat Mar 27 15:56:24 2010 +0100| [bbfc188c96453ca115c74780b1d92f9f7c27e733] | committer: Hugo Beauzee-Luyssen 

VideoClipWorkflow: Race condition work around.

This is temporary, this race condition has to be fixed, not worked
arround, you're hiding a bug ! (©)

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=bbfc188c96453ca115c74780b1d92f9f7c27e733
---

 src/Workflow/VideoClipWorkflow.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/Workflow/VideoClipWorkflow.cpp b/src/Workflow/VideoClipWorkflow.cpp
index 0e66184..9d0774e 100644
--- a/src/Workflow/VideoClipWorkflow.cpp
+++ b/src/Workflow/VideoClipWorkflow.cpp
@@ -126,6 +126,10 @@ VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode )
         m_renderLock->lock();
         m_computedBuffersMutex->lock();
     }
+    //FIXME
+    //TODO: This is a nasty work arround. The race condition needs to be fixed !
+    if ( m_computedBuffers.isEmpty() == true )
+        return NULL;
     ::StackedBuffer<LightVideoFrame*>* buff;
     if ( mode == ClipWorkflow::Pop )
         buff = new StackedBuffer( m_computedBuffers.dequeue(), this, true );



More information about the Vlmc-devel mailing list