mlt_position out = mlt_filter_get_out( base->filters[ i ] );
if ( ( in == 0 && out == 0 ) || ( position >= in && ( position <= out || out == 0 ) ) )
{
- mlt_properties_set_position( frame_properties, "in", 0 );
- mlt_properties_set_position( frame_properties, "out", out == 0 ? this_out - this_in : out - in );
+ mlt_properties_set_position( frame_properties, "in", in == 0 ? this_in : in );
+ mlt_properties_set_position( frame_properties, "out", out == 0 ? this_out : out );
mlt_filter_process( base->filters[ i ], frame );
mlt_service_apply_filters( mlt_filter_service( base->filters[ i ] ), frame, index + 1 );
}
properties = mlt_producer_properties( producer );
// Attach filters if we have a producer and it isn't already westley'd :-)
- if ( producer != NULL && mlt_properties_get( properties, "westley" ) == NULL )
+ if ( producer != NULL && mlt_properties_get( properties, "westley" ) == NULL && mlt_properties_get( properties, "_westley" ) == NULL )
attach_normalisers( producer );
// Now make sure we don't lose our identity
// If no malloc'd and consumer init ok
if ( this != NULL && mlt_consumer_init( this, NULL ) == 0 )
{
- // Allow thread to be started/stopped
- this->start = consumer_start;
- this->is_stopped = consumer_is_stopped;
+ if ( arg != NULL && strchr( arg, ':' ) )
+ {
+ char *temp = NULL;
+ int port = atoi( strchr( arg, ':' ) + 1 );
+ mlt_properties_set( mlt_consumer_properties( this ), "server", arg );
+ temp = mlt_properties_get( mlt_consumer_properties( this ), "server" );
+ *( strchr( temp, ':' ) ) = '\0';
+ mlt_properties_set_int( mlt_consumer_properties( this ), "port", port );
+ }
+ else
+ {
+ mlt_properties_set( mlt_consumer_properties( this ), "server", arg == NULL ? "localhost" : arg );
+ mlt_properties_set_int( mlt_consumer_properties( this ), "port", 5250 );
+ }
- mlt_properties_set( mlt_consumer_properties( this ), "server", arg == NULL ? "localhost" : arg );
- mlt_properties_set_int( mlt_consumer_properties( this ), "port", 5250 );
mlt_properties_set_int( mlt_consumer_properties( this ), "unit", 0 );
mlt_properties_set( mlt_consumer_properties( this ), "command", "append" );
+ // Allow thread to be started/stopped
+ this->start = consumer_start;
+ this->is_stopped = consumer_is_stopped;
+
// Return the consumer produced
return this;
}