vaapisink: fix get_caps() implementation for GStreamer 1.0.

Fix GstBaseSink::get_caps() implementation for GStreamer 1.0.X builds
by honouring the filter caps argument. More precisely, this fixes the
following pipeline: gst-launch-1.0 videotestsrc ! vaapisink

https://bugzilla.gnome.org/show_bug.cgi?id=705192

Signed-off-by: Guangxin.Xu <Guangxin.Xu@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
Guangxin.Xu 2013-07-31 16:49:20 +08:00 committed by Gwenole Beauchesne
parent d16db58968
commit 92a124f306

View file

@ -720,7 +720,17 @@ gst_vaapisink_get_caps_impl(GstBaseSink *base_sink)
static inline GstCaps *
gst_vaapisink_get_caps(GstBaseSink *base_sink, GstCaps *filter)
{
return gst_vaapisink_get_caps_impl(base_sink);
GstCaps *caps, *out_caps;
caps = gst_vaapisink_get_caps_impl(base_sink);
if (caps && filter) {
out_caps = gst_caps_intersect_full(caps, filter,
GST_CAPS_INTERSECT_FIRST);
gst_caps_unref(caps);
}
else
out_caps = caps;
return out_caps;
}
#else
#define gst_vaapisink_get_caps gst_vaapisink_get_caps_impl