// Callback registration
producer->get_frame = producer_get_frame;
- producer->close = producer_close;
+ producer->close = ( mlt_destructor )producer_close;
// Set the default properties
mlt_properties_set( properties, "resource", colour == NULL ? "0x000000ff" : colour );
// Obtain properties of producer
mlt_properties producer_props = mlt_producer_properties( producer );
+ // Determine if we're producing PAL or NTSC
+ int is_pal = mlt_properties_get_double( producer_props, "fps" ) == 25.0;
+
// Set the producer on the frame properties
mlt_properties_set_data( properties, "producer_colour", producer, 0, NULL, NULL );
// Set producer-specific frame properties
mlt_properties_set_int( properties, "progressive", 1 );
- mlt_properties_set_int( properties, "aspect_ratio", 1 );
+ mlt_properties_set_double( properties, "aspect_ratio", is_pal ? 128.0/117.0 : 72.0/79.0 );
// colour is an alias for resource
- // CY: Do we really need this?
if ( mlt_properties_get( producer_props, "colour" ) != NULL )
mlt_properties_set( producer_props, "resource", mlt_properties_get( producer_props, "colour" ) );
mlt_producer_close( producer );
free( producer );
}
-