]> git.sesse.net Git - mlt/blobdiff - src/modules/oldfilm/filter_dust.c
remove consumer_aspect_ratio property - use profile instead
[mlt] / src / modules / oldfilm / filter_dust.c
index d48ad87874779f49e3b9a2060f70f33eb5225d62..5a9673175eaa5c1a657bc094b86a899a23da4407 100644 (file)
@@ -66,11 +66,6 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        int maxdia = mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "maxdiameter" );
        int maxcount = mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "maxcount" );
 
-       mlt_position in = mlt_filter_get_in( filter );
-       mlt_position out = mlt_filter_get_out( filter );
-       mlt_position time = mlt_frame_get_position( this );
-       double position = ( double )( time - in ) / ( double )( out - in + 1 );
-       
        *format = mlt_image_yuv422;
        int error = mlt_frame_get_image( this, image, format, width, height, 1 );       
        // load svg
@@ -84,6 +79,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        
        if (!maxcount)
                return 0;
+
+       double position = mlt_filter_get_progress( filter, this );
        srand(position*10000);
 
        mlt_service_lock( MLT_FILTER_SERVICE( filter ) );
@@ -126,7 +123,6 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                                
                                if ( mlt_service_get_frame( MLT_PRODUCER_SERVICE( producer ), &luma_frame, 0 ) == 0 ){
                
-                                       mlt_properties_set_double ( MLT_FRAME_PROPERTIES ( luma_frame ) , "consumer_aspect_ratio" , 1.0 );
                                        mlt_image_format luma_format = mlt_image_yuv422;
                                        luma_width = dx;
                                        luma_height = luma_width * mlt_properties_get_int( MLT_FRAME_PROPERTIES ( luma_frame ) , "height" ) / mlt_properties_get_int( MLT_FRAME_PROPERTIES ( luma_frame ) , "width" );