]> git.sesse.net Git - mlt/commitdiff
fix crash in decklink mlt_consumer_stop()
authorDan Dennedy <dan@dennedy.org>
Fri, 11 Nov 2011 03:38:25 +0000 (19:38 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 12 Nov 2011 20:07:39 +0000 (12:07 -0800)
src/modules/decklink/consumer_decklink.cpp

index fd41046d9d1a4ff0142f059be4311f576d44b2e5..3a6316e90070c0bc57cfce849d6d0746bcfc8295 100644 (file)
@@ -278,11 +278,6 @@ public:
                mlt_properties_set_int( properties, "running", 0 );
                mlt_consumer_stopped( getConsumer() );
 
-               // release decklink frame
-               if ( m_decklinkFrame )
-                       m_decklinkFrame->Release();
-               m_decklinkFrame = NULL;
-
                // Stop the audio and video output streams immediately
                if ( m_deckLinkOutput )
                {
@@ -291,6 +286,11 @@ public:
                        m_deckLinkOutput->DisableVideoOutput();
                }
 
+               // release decklink frame
+               if ( m_decklinkFrame )
+                       m_decklinkFrame->Release();
+               m_decklinkFrame = NULL;
+
                if ( m_prerollThread )
                        pthread_join( m_prerollThread, NULL );
                m_prerollThread = 0;