[vlmc-devel] commit: PreviewWidget: Pausing Clip render when next/ previous frame is triggered. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Thu Apr 15 11:36:34 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Apr 15 11:34:10 2010 +0200| [4209c4d577f9ca506f488b8ad54798c5ccd98ebd] | committer: Hugo Beauzée-Luyssen 

PreviewWidget: Pausing Clip render when next/previous frame is triggered.

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

 src/Renderer/ClipRenderer.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index 8af97f4..32fa74b 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -152,7 +152,7 @@ ClipRenderer::togglePlayPause( bool forcePause )
 void
 ClipRenderer::nextFrame()
 {
-    if ( m_isRendering == true && m_paused == true )
+    if ( m_isRendering == true )
     {
         m_mediaPlayer->nextFrame();
     }
@@ -161,8 +161,10 @@ ClipRenderer::nextFrame()
 void
 ClipRenderer::previousFrame()
 {
-    if ( m_isRendering == true && m_paused == true )
+    if ( m_isRendering == true )
     {
+        if ( m_paused == false )
+            togglePlayPause( true );
         qint64   interval =  static_cast<qint64>( (1.0f / m_mediaPlayer->getFps()) * 1000.0f );
         m_mediaPlayer->setTime( m_mediaPlayer->getTime() - interval );
     }



More information about the Vlmc-devel mailing list