]> git.sesse.net Git - mlt/commitdiff
producer_framebuffer.c: Fix aspect ratio with slowmotion producer
authorj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 27 Jul 2008 21:41:09 +0000 (21:41 +0000)
committerj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 27 Jul 2008 21:41:09 +0000 (21:41 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1164 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/kdenlive/producer_framebuffer.c

index bb25ae3fcf1c3133dac84dbd3af651d1b3a6b3cc..0a24269e907c9124f72e476c40ccb108dae56e88 100644 (file)
@@ -82,6 +82,11 @@ static int framebuffer_get_image( mlt_frame this, uint8_t **image, mlt_image_for
 
        if( first_image == NULL )
        {
+               mlt_properties props = MLT_FRAME_PROPERTIES( this );
+               mlt_properties test_properties = MLT_FRAME_PROPERTIES( first_frame );
+               mlt_properties_set_double( test_properties, "consumer_aspect_ratio", mlt_properties_get_double( props, "consumer_aspect_ratio" ) );
+               mlt_properties_set( test_properties, "rescale.interp", mlt_properties_get( props, "rescale.interp" ) );
+
                error = mlt_frame_get_image( first_frame, &first_image, format, width, height, writable );
 
                if( error != 0 ) {
@@ -166,10 +171,6 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index
 
                        // Get the frame
                        mlt_service_get_frame( MLT_PRODUCER_SERVICE( real_producer ), &first_frame, index );
-
-                       double ratio = mlt_properties_get_double( MLT_PRODUCER_PROPERTIES( real_producer ), "aspect_ratio" ) * (double) mlt_properties_get_int( MLT_FRAME_PROPERTIES( first_frame ), "width" ) / (double) mlt_properties_get_int( MLT_FRAME_PROPERTIES( first_frame ), "height" ) / ( (double) mlt_properties_get_int(MLT_FRAME_PROPERTIES( *frame ), "width" ) / (double) mlt_properties_get_int( MLT_FRAME_PROPERTIES( *frame ), "height" ));
-
-                       mlt_properties_set_double( properties, "ratio_fix", ratio );
                }
 
                // Make sure things are in their place
@@ -185,7 +186,6 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index
 
                // Give the returned frame temporal identity
                mlt_frame_set_position( *frame, mlt_producer_position( this ) );
-               mlt_properties_set_double( MLT_FRAME_PROPERTIES(*frame), "aspect_ratio", mlt_properties_get_double( properties, "ratio_fix" ));
        }
 
        return 0;