subtitleoverlay: fix merge error
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 9 Feb 2012 14:51:10 +0000 (15:51 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 9 Feb 2012 14:51:10 +0000 (15:51 +0100)
Fix merge error from commit fb6d09055ae90979682fa4b1c6ee4f4abdaafd8f

gst/playback/gstsubtitleoverlay.c

index cd5af1f..2ac1952 100644 (file)
@@ -240,10 +240,21 @@ _is_raw_video (GstStructure * s)
 static gboolean
 _is_video_pad (GstPad * pad, gboolean * hw_accelerated)
 {
-  GstCaps *caps = gst_pad_get_current_caps (pad);
+  GstPad *peer = gst_pad_get_peer (pad);
+  GstCaps *caps;
   gboolean ret;
   const gchar *name;
 
+  if (peer) {
+    caps = gst_pad_get_current_caps (peer);
+    if (!caps) {
+      caps = gst_pad_query_caps (peer, NULL);
+    }
+    gst_object_unref (peer);
+  } else {
+    caps = gst_pad_query_caps (pad, NULL);
+  }
+
   name = gst_structure_get_name (gst_caps_get_structure (caps, 0));
   if (g_str_has_prefix (name, "video/x-raw-")) {
     ret = TRUE;