+ int cycle = mlt_properties_get_int( properties, "cycle" );
+ int duration = mlt_properties_get_int( properties, "duration" );
+ mlt_position position = mlt_filter_get_position( filter, this );
+
+ out = out? out + 1 : 25;
+ if ( cycle )
+ out = cycle;
+ if ( duration < 1 || duration > out )
+ duration = out;
+ *format = mlt_image_yuv422;
+
+ if ( b_frame == NULL || mlt_properties_get_int( b_frame_props, "width" ) != *width || mlt_properties_get_int( b_frame_props, "height" ) != *height )
+ {
+ b_frame = mlt_frame_init( MLT_FILTER_SERVICE( filter ) );
+ mlt_properties_set_data( properties, "frame", b_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
+ }