From 9c47e7d5e6fd273107c3b7acc7dc428f4a8766df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 11 Jun 2015 16:18:51 +0200 Subject: [PATCH] playbin: Check in autoplug_continue against the subtitle factory caps correctly 6a2f017bfa9cb73c6db65eea0b84b1d5b56febb7 changed it to check the subtitle factory caps if there is a text-sink but we fail to get its sinkpad. What actually should be done here is to use the factory caps if there is no text-sink at all. https://bugzilla.gnome.org/show_bug.cgi?id=750785 --- gst/playback/gstplaybin2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 5a823ce548..8d3782e1d4 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -4423,13 +4423,13 @@ autoplug_continue_cb (GstElement * element, GstPad * pad, GstCaps * caps, ret = !gst_pad_query_accept_caps (sinkpad, caps); gst_caps_unref (sinkcaps); gst_object_unref (sinkpad); - } else { - GstCaps *subcaps = gst_subtitle_overlay_create_factory_caps (); - ret = !gst_caps_is_subset (caps, subcaps); - gst_caps_unref (subcaps); } if (activated_sink) gst_element_set_state (group->text_sink, GST_STATE_NULL); + } else { + GstCaps *subcaps = gst_subtitle_overlay_create_factory_caps (); + ret = !gst_caps_is_subset (caps, subcaps); + gst_caps_unref (subcaps); } /* If autoplugging can stop don't do additional checks */ if (!ret)