[vlmc-devel] WorkflowRenderer: Don't start the renderer if it is already rendering

Yikai Lu git at videolan.org
Sun Apr 10 14:18:11 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sun Apr 10 19:21:22 2016 +0900| [25f3b37b5f06e48ed3866005295d60f564238b6d] | committer: Hugo Beauzée-Luyssen

WorkflowRenderer: Don't start the renderer if it is already rendering

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/25f3b37b5f06e48ed3866005295d60f564238b6d
---

 src/Renderer/WorkflowRenderer.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 2586e2d..ea5a450 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -228,6 +228,8 @@ WorkflowRenderer::startRenderToFile( const QString& outputFileName, quint32 widt
                                      double fps, const QString& ar,
                                      quint32 vbitrate, quint32 abitrate )
 {
+    if ( m_isRendering == true )
+        return ;
     m_width = width;
     m_height = height;
     m_outputFps = fps;
@@ -247,6 +249,8 @@ WorkflowRenderer::startRenderToFile( const QString& outputFileName, quint32 widt
 void
 WorkflowRenderer::startPreview()
 {
+    if ( m_isRendering == true )
+        return ;
     if ( m_mainWorkflow->getLengthFrame() <= 0 )
         return ;
 



More information about the Vlmc-devel mailing list