X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_producer.c;h=50d12220801b3c1204f9fbf6d01de1977ebdbe82;hb=b21b66672758c0dade3c3549cc7f6822bb853523;hp=72b676cdf1d9da0e354bade9cd583546d5759958;hpb=51f097a1265af1a197988b9731c8dc414ac8cc9b;p=melted diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index 72b676c..50d1222 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -195,8 +195,8 @@ mlt_producer mlt_producer_cut( mlt_producer this, int in, int out ) // Special case - allow for a cut of the entire producer (this will squeeze all other cuts to 0) if ( in <= 0 ) in = 0; - if ( out >= mlt_producer_get_playtime( parent ) && !mlt_producer_is_blank( this ) ) - out = mlt_producer_get_playtime( parent ) - 1; + if ( ( out < 0 || out >= mlt_producer_get_playtime( parent ) ) && !mlt_producer_is_blank( this ) ) + out = mlt_producer_get_playtime( parent ); mlt_properties_inc_ref( parent_props ); mlt_properties_set_int( properties, "_cut", 1 );