subtitleoverlay: return available factory CAPS instead of ANY on CAPS query

https://bugzilla.gnome.org/show_bug.cgi?id=739536
This commit is contained in:
Andreas Frisch 2014-11-02 21:45:30 +01:00 committed by Sebastian Dröge
parent b4ee10f616
commit bae96c85ee

View file

@ -1778,12 +1778,15 @@ gst_subtitle_overlay_subtitle_sink_chain (GstPad * pad, GstObject * parent,
static GstCaps *
gst_subtitle_overlay_subtitle_sink_getcaps (GstPad * pad, GstCaps * filter)
{
GstCaps *ret;
GstCaps *ret, *subcaps;
if (filter)
ret = gst_caps_ref (filter);
else
ret = gst_caps_new_any ();
subcaps = gst_subtitle_overlay_create_factory_caps ();
if (filter) {
ret = gst_caps_intersect_full (filter, subcaps, GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (subcaps);
} else {
ret = subcaps;
}
return ret;
}