From: Dan Dennedy Date: Fri, 11 Nov 2011 03:38:25 +0000 (-0800) Subject: fix crash in decklink mlt_consumer_stop() X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e077bf7d2573308a6fdc91f55fd45c94249bc01f;p=mlt fix crash in decklink mlt_consumer_stop() --- diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp index fd41046d..3a6316e9 100644 --- a/src/modules/decklink/consumer_decklink.cpp +++ b/src/modules/decklink/consumer_decklink.cpp @@ -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;