textoverlay: remove code that can't be reached
authorTim-Philipp Müller <tim@centricular.com>
Fri, 29 Aug 2014 18:15:56 +0000 (19:15 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 29 Aug 2014 18:18:55 +0000 (19:18 +0100)
If this code could ever be reached, it would leak
memory (CID 1231978), but gst_caps_get_features()
never returns NULL, so that can't happen.

ext/pango/gstbasetextoverlay.c

index da371af..a1622cd 100644 (file)
@@ -744,13 +744,8 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps)
     overlay_caps = gst_caps_copy (caps);
 
     f = gst_caps_get_features (overlay_caps, 0);
-    if (f == NULL) {
-      f = gst_caps_features_new
-          (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
-    } else {
-      gst_caps_features_add (f,
-          GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
-    }
+    gst_caps_features_add (f,
+        GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
 
     ret = gst_pad_peer_query_accept_caps (overlay->srcpad, overlay_caps);
     GST_DEBUG_OBJECT (overlay, "Downstream accepts the overlay meta: %d", ret);