]> git.sesse.net Git - mlt/blobdiff - src/modules/decklink/consumer_decklink.cpp
fix crash in decklink mlt_consumer_stop()
[mlt] / 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;