mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
gloverlaycompositor: Don't leak caps feature
Only copy it if we really are going to modify and use it CID #1439873 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/652>
This commit is contained in:
parent
637bbac622
commit
add3023f09
1 changed files with 6 additions and 9 deletions
|
@ -156,16 +156,13 @@ _oce_transform_internal_caps (GstGLFilter * filter,
|
|||
for (i = 0; i < n; i++) {
|
||||
GstCapsFeatures *feat = gst_caps_get_features (removed, i);
|
||||
|
||||
if (feat) {
|
||||
if (feat && gst_caps_features_contains (feat,
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION)) {
|
||||
feat = gst_caps_features_copy (feat);
|
||||
|
||||
if (gst_caps_features_contains (feat,
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION)) {
|
||||
/* prefer the passthrough case */
|
||||
gst_caps_features_remove (feat,
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
|
||||
gst_caps_set_features (removed, i, feat);
|
||||
}
|
||||
/* prefer the passthrough case */
|
||||
gst_caps_features_remove (feat,
|
||||
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
|
||||
gst_caps_set_features (removed, i, feat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue