playbin: Check in autoplug_continue against the subtitle factory caps correctly
authorSebastian Dröge <sebastian@centricular.com>
Thu, 11 Jun 2015 14:18:51 +0000 (16:18 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 11 Jun 2015 14:18:51 +0000 (16:18 +0200)
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

index 5a823ce..8d3782e 100644 (file)
@@ -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)