Commit 383f58b0 authored by Sebastian Dröge's avatar Sebastian Dröge

subtitleoverlay: Return ANY caps for the GET_CAPS query

subtitleoverlay handles any caps, not just the ones
for which a subtitle parser/renderer exist. It will
just ignore any unsupported streams instead of causing
an error.
parent 9084bc15
......@@ -1936,23 +1936,12 @@ gst_subtitle_overlay_subtitle_sink_chain (GstPad * pad, GstObject * parent,
static GstCaps *
gst_subtitle_overlay_subtitle_sink_getcaps (GstPad * pad, GstCaps * filter)
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
GstCaps *ret;
g_mutex_lock (&self->factories_lock);
if (G_UNLIKELY (!gst_subtitle_overlay_update_factory_list (self)))
ret = gst_caps_new_empty ();
else if (filter)
ret =
gst_caps_intersect_full (filter, self->factory_caps,
if (filter)
ret = gst_caps_ref (filter);
ret = gst_caps_ref (self->factory_caps);
g_mutex_unlock (&self->factories_lock);
GST_DEBUG_OBJECT (pad, "Returning subtitle caps %" GST_PTR_FORMAT, ret);
gst_object_unref (self);
ret = gst_caps_new_any ();
return ret;
......@@ -2189,13 +2178,7 @@ gst_subtitle_overlay_subtitle_sink_query (GstPad * pad, GstObject * parent,
switch (GST_QUERY_TYPE (query)) {
GstCaps *caps, *othercaps;
gst_query_parse_accept_caps (query, &caps);
othercaps = gst_subtitle_overlay_subtitle_sink_getcaps (pad, NULL);
ret = gst_caps_is_subset (caps, othercaps);
gst_caps_unref (othercaps);
gst_query_set_accept_caps_result (query, ret);
gst_query_set_accept_caps_result (query, TRUE);
ret = TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment