]> git.sesse.net Git - mlt/commitdiff
fix crash in sdl_preview with multi consumer
authorDan Dennedy <dan@dennedy.org>
Fri, 11 Nov 2011 03:39:51 +0000 (19:39 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 12 Nov 2011 20:07:39 +0000 (12:07 -0800)
src/modules/sdl/consumer_sdl_preview.c

index fed76523acbc733f7fea1ce477a9eb50367e6e4f..bd5fe3661473a8ab2cafc24ad795b6f4974bdc9a 100644 (file)
@@ -343,7 +343,7 @@ static void *consumer_thread( void *arg )
                        if ( speed != 1 )
                        {
                                mlt_producer producer = MLT_PRODUCER( mlt_service_get_producer( MLT_CONSUMER_SERVICE( consumer ) ) );
-                               mlt_position duration = mlt_producer_get_playtime( producer );
+                               mlt_position duration = producer? mlt_producer_get_playtime( producer ) : -1;
                                int pause = 0;
 
 #ifndef SKIP_WAIT_EOS