glmixer: ensure caps are writable after intersection
authorMatthew Waters <matthew@centricular.com>
Wed, 18 Jan 2017 04:03:48 +0000 (15:03 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:26 +0000 (19:32 +0000)
gst_caps_intersect () may return an increased reference of one of the
input caps.

Fixes critical in the simple-launch-lines test:

Unexpected critical/warning: gst_caps_set_features: assertion 'IS_WRITABLE (caps)' failed

ext/gl/gstglmixer.c

index 9a7446a..b8f4da0 100644 (file)
@@ -224,6 +224,7 @@ _update_caps (GstVideoAggregator * vagg, GstCaps * caps, GstCaps * filter)
 
   if (filter) {
     tmp = gst_caps_intersect (caps, filter);
+    tmp = gst_caps_make_writable (tmp);
   } else {
     tmp = gst_caps_copy (caps);
   }