[vlmc-devel] commit: TrackHandler: Fix bug when restarting the render. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Sun Aug 22 22:54:22 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Aug 22 20:30:04 2010 +0200| [f6f36794ad03b2158120e9100a94429e38f642e7] | committer: Hugo Beauzée-Luyssen 

TrackHandler: Fix bug when restarting the render.

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

 src/Workflow/TrackHandler.cpp  |    7 +------
 src/Workflow/TrackWorkflow.cpp |    2 +-
 src/Workflow/TrackWorkflow.h   |    2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/Workflow/TrackHandler.cpp b/src/Workflow/TrackHandler.cpp
index 199f334..16daa66 100644
--- a/src/Workflow/TrackHandler.cpp
+++ b/src/Workflow/TrackHandler.cpp
@@ -107,7 +107,7 @@ TrackHandler::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
 
     for ( int i = m_trackCount - 1; i >= 0; --i )
     {
-        if ( m_tracks[i].activated() == false || m_tracks[i]->hasFrameToRender( currentFrame ) )
+        if ( m_tracks[i].activated() == false || m_tracks[i]->hasNoMoreFrameToRender( currentFrame ) )
             continue ;
         validTrack = true;
         Workflow::OutputBuffer  *ret = m_tracks[i]->getOutput( currentFrame, subFrame, paused );
@@ -272,10 +272,5 @@ void
 TrackHandler::stopFrameComputing()
 {
     for ( unsigned int i = 0; i < m_trackCount; ++i )
-    {
-        //First stop the frame computing
         m_tracks[i]->stopFrameComputing();
-        //then deactivate the track to avoid the generation to be resumed.
-        m_tracks[i].deactivate();
-    }
 }
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index 241d1bd..47625f7 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -234,7 +234,7 @@ TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
 }
 
 bool
-TrackWorkflow::hasFrameToRender( qint64 currentFrame ) const
+TrackWorkflow::hasNoMoreFrameToRender( qint64 currentFrame ) const
 {
     if ( m_clips.size() == 0 )
         return true;
diff --git a/src/Workflow/TrackWorkflow.h b/src/Workflow/TrackWorkflow.h
index 9863bd1..db95097 100644
--- a/src/Workflow/TrackWorkflow.h
+++ b/src/Workflow/TrackWorkflow.h
@@ -90,7 +90,7 @@ class   TrackWorkflow : public QObject
         bool                                    contains( const QUuid& uuid ) const;
 
         void                                    stopFrameComputing();
-        bool                                    hasFrameToRender( qint64 currentFrame ) const;
+        bool                                    hasNoMoreFrameToRender( qint64 currentFrame ) const;
 
     private:
         void                                    computeLength();



More information about the Vlmc-devel mailing list