From: Dan Dennedy Date: Wed, 23 Mar 2011 07:11:59 +0000 (-0700) Subject: Fix a couple null pointer bugs. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a8a8033952209775809b2f4d25b5ac806787596d;p=mlt Fix a couple null pointer bugs. --- diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 7fba5564..418c1199 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -1184,7 +1184,7 @@ static mlt_frame worker_get_frame( mlt_consumer self, mlt_properties properties // Adapt the worker process head to the runtime conditions. if ( self->real_time > 0 ) { - if ( mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "rendered" ) ) + if ( frame && mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "rendered" ) ) { self->consecutive_dropped = 0; if ( self->process_head > size && self->consecutive_rendered >= self->process_head ) diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp index b2c4c2c5..17c496e4 100644 --- a/src/modules/decklink/consumer_decklink.cpp +++ b/src/modules/decklink/consumer_decklink.cpp @@ -358,6 +358,8 @@ public: } else { + if ( !m_frame ) + m_frame = frame; // Reuse the last frame mlt_log_verbose( &m_consumer, "dropped video frame %u\n", ++m_dropped ); }