]> git.sesse.net Git - mlt/commitdiff
Fix executing stop when not started (and vice versa).
authorDan Dennedy <dan@dennedy.org>
Sat, 24 Sep 2011 19:08:55 +0000 (12:08 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 24 Sep 2011 19:08:55 +0000 (12:08 -0700)
src/modules/decklink/producer_decklink.cpp

index efc139152e7d645d569d1e3074c31d679d2eca01..171bf04a1879d7824164c6e5a9b0a327037f9924 100644 (file)
@@ -215,8 +215,9 @@ public:
 
        void stop()
        {
-               if ( m_started )
+               if ( !m_started )
                        return;
+               m_started = false;
 
                // Release the wait in getFrame
                pthread_mutex_lock( &m_mutex );
@@ -230,8 +231,6 @@ public:
                while ( mlt_frame frame = (mlt_frame) mlt_deque_pop_back( m_queue ) )
                        mlt_frame_close( frame );
                pthread_mutex_unlock( &m_mutex );
-
-               m_started = false;
        }
 
        mlt_frame getFrame()