[vlmc-devel] VideoClipWorkflow: Use a more intuitive way of checking if the rendering was stopped while waiting for a frame

Hugo Beauzée-Luyssen git at videolan.org
Sun Jan 26 22:08:43 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Jan 26 23:06:00 2014 +0200| [828b1fa99746edbfa6ec379e6e3f3415d1aaeae0] | committer: Hugo Beauzée-Luyssen

VideoClipWorkflow: Use a more intuitive way of checking if the rendering was stopped while waiting for a frame

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

 src/Workflow/VideoClipWorkflow.cpp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Workflow/VideoClipWorkflow.cpp b/src/Workflow/VideoClipWorkflow.cpp
index 00768bc..ad38cf7 100644
--- a/src/Workflow/VideoClipWorkflow.cpp
+++ b/src/Workflow/VideoClipWorkflow.cpp
@@ -132,10 +132,11 @@ VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode, qint64 currentFrame )
     if ( shouldRender() == false )
         return NULL;
     if ( getNbComputedBuffers() == 0 )
+    {
         m_renderWaitCond->wait( m_renderLock );
-    //Recheck again, as the WaitCondition may have been awaken when stopping.
-    if ( getNbComputedBuffers() == 0 )
-        return NULL;
+        if ( m_state == Stopped )
+            return NULL;
+    }
     Workflow::Frame         *buff = NULL;
     if ( mode == ClipWorkflow::Pop )
     {



More information about the Vlmc-devel mailing list