]> git.sesse.net Git - mlt/commitdiff
Fix a couple null pointer bugs.
authorDan Dennedy <dan@dennedy.org>
Wed, 23 Mar 2011 07:11:59 +0000 (00:11 -0700)
committerDan Dennedy <dan@dennedy.org>
Wed, 23 Mar 2011 07:11:59 +0000 (00:11 -0700)
src/framework/mlt_consumer.c
src/modules/decklink/consumer_decklink.cpp

index 7fba55641b3b211589e2bb95bcee220f8da16755..418c11994c8a4209f198f3f9c4429a411c91686c 100644 (file)
@@ -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 )
index b2c4c2c513c9e2285120344cb007c62a6323cb64..17c496e426429b30f15e852b35edfb5afd270b6f 100644 (file)
@@ -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 );
                }