// We need to ensure that the multitrack reports the longest track as its length
mlt_position length = 0;
- // We need to ensure that fps are the same on all services
- double fps = 0;
-
// Obtain stats on all connected services
for ( i = 0; i < this->count; i ++ )
{
// Determine the longest length
//if ( !mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "hide" ) )
length = mlt_producer_get_playtime( producer ) > length ? mlt_producer_get_playtime( producer ) : length;
-
- // Handle fps
- if ( fps == 0 )
- {
- // This is the first producer, so it controls the fps
- fps = mlt_producer_get_fps( producer );
- }
- else if ( fps != mlt_producer_get_fps( producer ) )
- {
- // Generate a warning for now - the following attempt to fix may fail
- fprintf( stderr, "Warning: fps mismatch on track %d\n", i );
-
- // It should be safe to impose fps on an image producer, but not necessarily safe for video
- mlt_properties_set_double( MLT_PRODUCER_PROPERTIES( producer ), "fps", fps );
- }
}
}
mlt_properties_set_position( properties, "length", length );
mlt_events_unblock( properties, properties );
mlt_properties_set_position( properties, "out", length - 1 );
- mlt_properties_set_double( properties, "fps", fps );
}
/** Listener for producers on the playlist.
else
{
// Generate a test frame
- *frame = mlt_frame_init( );
+ *frame = mlt_frame_init( MLT_PRODUCER_SERVICE( parent ) );
// Update position on the frame we're creating
mlt_frame_set_position( *frame, mlt_producer_position( parent ) );