X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Favformat%2Fconsumer_avformat.c;h=1e801ce7b4a9f94c42f136e956ace4f208048cfd;hb=3833ec4ee7ffd18732242b30b602740d1ac7acad;hp=753280256fdd92e1b71b67a9602a6e84c68bcdce;hpb=9215d84f33d395232a752c6fe5b1cb20a50459ec;p=melted diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 7532802..1e801ce 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -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 );