// 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 );
char *eof = mlt_properties_get( mlt_producer_properties( this ), "eof" );
// A properly instatiated producer will have a get_frame method...
+//fprintf( stderr, "PRODUCER get_frame %p eof %s pos %lld out %lld\n",
+//this->get_frame, eof, mlt_producer_position( this ), mlt_producer_get_out( this ) );
if ( this->get_frame == NULL || ( !strcmp( eof, "continue" ) && mlt_producer_position( this ) > mlt_producer_get_out( this ) ) )
{
// Generate a test frame