From: <sa...@ke...> - 2009-11-22 22:07:35
|
Module: gst-plugins-bad Branch: master Commit: 7401cd90ad20edc6c11b26146b40adbb73215a47 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=7401cd90ad20edc6c11b26146b40adbb73215a47 Author: Carl-Anton Ingmarsson <ca....@gm...> Date: Sun Nov 22 22:34:19 2009 +0100 vdpausink: intersect allowed caps with our template caps --- sys/vdpau/gstvdpsink.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/vdpau/gstvdpsink.c b/sys/vdpau/gstvdpsink.c index 0e0fb13..3971c9c 100644 --- a/sys/vdpau/gstvdpsink.c +++ b/sys/vdpau/gstvdpsink.c @@ -545,10 +545,15 @@ gst_vdp_sink_calculate_par (Display * display) static GstCaps * gst_vdp_sink_get_allowed_caps (GstVdpDevice * device, GValue * par) { - GstCaps *caps; + GstCaps *templ_caps, *allowed_caps, *caps; gint i; - caps = gst_vdp_output_buffer_get_allowed_caps (device); + allowed_caps = gst_vdp_output_buffer_get_allowed_caps (device); + templ_caps = gst_static_pad_template_get_caps (&sink_template); + caps = gst_caps_intersect (allowed_caps, templ_caps); + + gst_caps_unref (allowed_caps); + gst_caps_unref (templ_caps); if (!par) par = gst_vdp_sink_calculate_par (device->display); |