From b8343b4a14ee33b561378d0f3a6e88b5c5acacdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 23 Feb 2012 11:05:11 +0100 Subject: [PATCH] playsink: Force the aspect ratio if the sink has such a property --- gst/playback/gstplaysink.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index e48eefac36..7e5bb575a1 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -1376,6 +1376,13 @@ gen_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async) chain->async = TRUE; } + /* Make sure the aspect ratio is kept */ + elem = + gst_play_sink_find_property_sinks (playsink, chain->sink, + "force-aspect-ratio", G_TYPE_BOOLEAN); + if (elem) + g_object_set (elem, "force-aspect-ratio", TRUE, NULL); + /* find ts-offset element */ gst_object_replace ((GstObject **) & chain->ts_offset, (GstObject *) gst_play_sink_find_property_sinks (playsink, chain->sink, "ts-offset", @@ -1529,6 +1536,13 @@ setup_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async) chain->async = TRUE; } + /* Make sure the aspect ratio is kept */ + elem = + gst_play_sink_find_property_sinks (playsink, chain->sink, + "force-aspect-ratio", G_TYPE_BOOLEAN); + if (elem) + g_object_set (elem, "force-aspect-ratio", TRUE, NULL); + if (chain->conv) g_object_set (chain->conv, "use-balance", !has_color_balance_element (chain->sink)