[vlmc-devel] fix for volumeslider crash when no video loaded
Ankur Gupta
git at videolan.org
Tue Mar 8 13:01:17 CET 2016
vlmc | branch: master | Ankur Gupta <ankur.vision0 at gmail.com> | Tue Mar 8 08:18:55 2016 +0530| [a7a1cc0e3b3cab31e7e5d86a7c0cbf1d2bc88546] | committer: Hugo Beauzée-Luyssen
fix for volumeslider crash when no video loaded
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/a7a1cc0e3b3cab31e7e5d86a7c0cbf1d2bc88546
---
src/Renderer/ClipRenderer.cpp | 8 ++++++--
src/Renderer/WorkflowRenderer.cpp | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index aecdd0a..7ab2957 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -147,10 +147,14 @@ ClipRenderer::getVolume() const
return m_sourceRenderer->volume();
}
-void ClipRenderer::setVolume( int volume )
+void
+ClipRenderer::setVolume( int volume )
{
//Returns 0 if the volume was set, -1 if it was out of range
- return m_sourceRenderer->setVolume( volume );
+ if( m_isRendering == true )
+ {
+ return m_sourceRenderer->setVolume( volume );
+ }
}
void
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 24a9b55..e07bff2 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -274,10 +274,14 @@ WorkflowRenderer::getVolume() const
return m_sourceRenderer->volume();
}
-void WorkflowRenderer::setVolume( int volume )
+void
+WorkflowRenderer::setVolume( int volume )
{
//Returns 0 if the volume was set, -1 if it was out of range
- m_sourceRenderer->setVolume( volume );
+ if( m_isRendering == true )
+ {
+ m_sourceRenderer->setVolume( volume );
+ }
}
qint64
More information about the Vlmc-devel
mailing list