]> git.sesse.net Git - mlt/commitdiff
fix pango's producer force_aspect_ratio property handling
authorMaksym Veremeyenko <verem@m1stereo.tv>
Sat, 14 Jan 2012 16:01:31 +0000 (18:01 +0200)
committerDan Dennedy <dan@dennedy.org>
Wed, 18 Jan 2012 04:24:02 +0000 (20:24 -0800)
src/modules/gtk2/producer_pango.c

index deb8bd27c354c3020833a9ea315a418dee9692f3..ef4985c5d3818812355706799a7f8172eeaa761f 100644 (file)
@@ -536,6 +536,9 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
 {
        producer_pango this = producer->child;
 
+       // Fetch the producers properties
+       mlt_properties producer_properties = MLT_PRODUCER_PROPERTIES( producer );
+
        // Generate a frame
        *frame = mlt_frame_init( MLT_PRODUCER_SERVICE( producer ) );
 
@@ -556,7 +559,11 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
 
        // Set producer-specific frame properties
        mlt_properties_set_int( properties, "progressive", 1 );
-       mlt_properties_set_double( properties, "aspect_ratio", 1 );
+       double force_ratio = mlt_properties_get_double( producer_properties, "force_aspect_ratio" );
+       if ( force_ratio > 0.0 )
+               mlt_properties_set_double( properties, "aspect_ratio", force_ratio );
+       else
+               mlt_properties_set_double( properties, "aspect_ratio", 1.0);
 
        // Stack the get image callback
        mlt_frame_push_service( *frame, this );