mlt_service mlt_consumer_service( mlt_consumer this )
{
- return &this->parent;
+ return this != NULL ? &this->parent : NULL;
}
/** Get the consumer properties.
mlt_properties mlt_consumer_properties( mlt_consumer this )
{
- return mlt_service_properties( &this->parent );
+ return this != NULL ? mlt_service_properties( &this->parent ) : NULL;
}
/** Connect the consumer to the producer.
if ( this->ahead == 0 )
{
int buffer = mlt_properties_get_int( properties, "buffer" );
+ int prefill = mlt_properties_get_int( properties, "prefill" );
consumer_read_ahead_start( this );
if ( buffer > 1 )
- size = buffer;
+ size = prefill > 0 && prefill < buffer ? prefill : buffer;
}
// Get frame from queue