playsink: Force the aspect ratio if the sink has such a property

This commit is contained in:
Sebastian Dröge 2012-02-23 11:05:11 +01:00
parent 55aaec3102
commit b8343b4a14

View file

@ -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)