From 570f5a1b8fd67ae4a7bebaea02fdfe302caf0317 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko Date: Sat, 14 Jan 2012 18:01:31 +0200 Subject: [PATCH] fix pango's producer force_aspect_ratio property handling --- src/modules/gtk2/producer_pango.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/gtk2/producer_pango.c b/src/modules/gtk2/producer_pango.c index deb8bd27..ef4985c5 100644 --- a/src/modules/gtk2/producer_pango.c +++ b/src/modules/gtk2/producer_pango.c @@ -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 ); -- 2.39.2