From bae96c85eed7fe5271924721055ea7be85e82cb7 Mon Sep 17 00:00:00 2001 From: Andreas Frisch Date: Sun, 2 Nov 2014 21:45:30 +0100 Subject: [PATCH] subtitleoverlay: return available factory CAPS instead of ANY on CAPS query https://bugzilla.gnome.org/show_bug.cgi?id=739536 --- gst/playback/gstsubtitleoverlay.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index e5b2fea..fe1638e 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -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; } -- 2.7.4