// Check bounds
if ( position < 0 )
+ {
position = 0;
+ }
else if ( !strcmp( eof, "pause" ) && position >= mlt_producer_get_playtime( this ) )
+ {
+ mlt_producer_set_speed( this, 0 );
position = mlt_producer_get_playtime( this ) - 1;
+ }
+ else if ( !strcmp( eof, "loop" ) && position >= mlt_producer_get_playtime( this ) )
+ {
+ position = position % mlt_producer_get_playtime( this );
+ }
// Set the position
mlt_properties_set_position( mlt_producer_properties( this ), "_position", position );
// Set the position
result = mlt_frame_set_position( *frame, mlt_producer_position( this ) );
+ // Mark as a test card
+ mlt_properties_set_int( mlt_frame_properties( *frame ), "test_image", 1 );
+ mlt_properties_set_int( mlt_frame_properties( *frame ), "test_audio", 1 );
+
// Calculate the next position
mlt_producer_prepare_next( this );
}