basetextoverlay: Fix bug with unused upstream_has_meta

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
This commit is contained in:
Nicolas Dufresne 2015-07-02 10:47:45 -04:00
parent 828f0291bf
commit 91f2f1874c

View file

@ -718,7 +718,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps)
/* Check if upstream caps have meta */ /* Check if upstream caps have meta */
if ((f = gst_caps_get_features (caps, 0))) { 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); GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
} }