basetextoverlay: Fix bug with unused upstream_has_meta
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 2 Jul 2015 14:47:45 +0000 (10:47 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 2 Jul 2015 14:47:45 +0000 (10:47 -0400)
The intention was to skip the allocation query if upstream has decided
to use the overlay meta feature in the caps. We can safely assume that
upstream have done that query already before making this decision. This
is an optimization since doing allocation queries is relatively
expensive.

CID #1308943

ext/pango/gstbasetextoverlay.c

index 301db50..b1b3b93 100644 (file)
@@ -718,7 +718,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps)
 
   /* Check if upstream caps have meta */
   if ((f = gst_caps_get_features (caps, 0))) {
-    caps_has_meta = gst_caps_features_contains (f,
+    upstream_has_meta = gst_caps_features_contains (f,
         GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
   }