mlt_properties properties = mlt_frame_properties( this );
mlt_get_image get_image = mlt_frame_pop_get_image( this );
mlt_producer producer = mlt_properties_get_data( properties, "test_card_producer", NULL );
+
+ *width = *width >> 1 << 1;
if ( get_image != NULL )
{
- return get_image( this, buffer, format, width, height, writable );
+ int error = 0;
+ mlt_position position = mlt_frame_get_position( this );
+ error = get_image( this, buffer, format, width, height, writable );
+ mlt_frame_set_position( this, position );
+ return error;
}
else if ( mlt_properties_get_data( properties, "image", NULL ) != NULL )
{
mlt_properties_set_data( properties, "image", *buffer, *width * *height * 2, NULL, NULL );
mlt_properties_set_int( properties, "width", *width );
mlt_properties_set_int( properties, "height", *height );
+ mlt_properties_set_double( properties, "aspect_ratio", mlt_frame_get_aspect_ratio( test_frame ) );
mlt_properties_set( properties, "rescale.interp", "none" );
mlt_properties_set( properties, "scale", "off" );
}
return 0;
}
-unsigned char *mlt_frame_get_waveform( mlt_frame this, double fps, int w, int h )
+unsigned char *mlt_frame_get_waveform( mlt_frame this, int w, int h )
{
int16_t *pcm = NULL;
mlt_properties properties = mlt_frame_properties( this );
mlt_audio_format format = mlt_audio_pcm;
int frequency = 32000; // lower frequency available?
int channels = 2;
+ double fps = mlt_properties_get_double( properties, "fps" );
int samples = mlt_sample_calculator( fps, frequency, mlt_frame_get_position( this ) );
// Get the pcm data