]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/consumer_avformat.c
consumer avformat fix and silly stuff in lumas
[mlt] / src / modules / avformat / consumer_avformat.c
index 753280256fdd92e1b71b67a9602a6e84c68bcdce..1e801ce7b4a9f94c42f136e956ace4f208048cfd 100644 (file)
@@ -920,8 +920,11 @@ static void *consumer_thread( void *arg )
                if ( real_time_output && frames % 25 == 0 )
                {
                        long passed = time_difference( &ante );
-                       long pending = ( ( ( long )sample_fifo_used( fifo ) * 1000 ) / frequency ) * 1000;
-                       passed -= pending;
+                       if ( fifo != NULL )
+                       {
+                               long pending = ( ( ( long )sample_fifo_used( fifo ) * 1000 ) / frequency ) * 1000;
+                               passed -= pending;
+                       }
                        if ( passed < total_time )
                        {
                                long total = ( total_time - passed );