mlt_properties_set_int( properties, "height", 576 );
mlt_properties_set_int( properties, "normalised_width", 720 );
mlt_properties_set_int( properties, "normalised_height", 576 );
- mlt_properties_set_double( properties, "aspect_ratio", 72.0/79.0 );
+ mlt_properties_set_double( properties, "aspect_ratio", 59.0/54.0 );
}
else
{
mlt_properties_set_int( properties, "height", 480 );
mlt_properties_set_int( properties, "normalised_width", 720 );
mlt_properties_set_int( properties, "normalised_height", 480 );
- mlt_properties_set_double( properties, "aspect_ratio", 128.0/117.0 );
+ mlt_properties_set_double( properties, "aspect_ratio", 10.0/11.0 );
}
mlt_properties_set_data( properties, "audio", NULL, 0, NULL, NULL );
mlt_position mlt_frame_get_position( mlt_frame this )
{
- return mlt_properties_get_position( mlt_frame_properties( this ), "_position" );
+ int pos = mlt_properties_get_position( mlt_frame_properties( this ), "_position" );
+ return pos < 0 ? 0 : pos;
}
/** Set the position of this frame.
//fprintf( stderr, "mix: frame dest samples %d channels %d position %lld\n", samples_dest, channels_dest, mlt_properties_get_position( mlt_frame_properties( this ), "_position" ) );
mlt_frame_get_audio( that, &src, format, &frequency_src, &channels_src, &samples_src );
//fprintf( stderr, "mix: frame src samples %d channels %d\n", samples_src, channels_src );
-
+
+ int silent = mlt_properties_get_int( mlt_frame_properties( this ), "silent_audio" );
+ mlt_properties_set_int( mlt_frame_properties( this ), "silent_audio", 0 );
+ if ( silent )
+ memset( dest, 0, samples_dest * channels_dest * sizeof( int16_t ) );
+
+ silent = mlt_properties_get_int( mlt_frame_properties( that ), "silent_audio" );
+ mlt_properties_set_int( mlt_frame_properties( that ), "silent_audio", 0 );
+ if ( silent )
+ memset( src, 0, samples_src * channels_src * sizeof( int16_t ) );
+
if ( channels_src > 6 )
channels_src = 0;
if ( channels_dest > 6 )