glfilter: Get rid of uploader if caps have changed
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 3 Mar 2015 18:45:46 +0000 (13:45 -0500)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:56 +0000 (19:31 +0000)
We need to update the uploader format if that caps have changed.

https://bugzilla.gnome.org/show_bug.cgi?id=745549

gst-libs/gst/gl/gstglfilter.c

index e74166f..6700da5 100644 (file)
@@ -865,6 +865,13 @@ gst_gl_filter_set_caps (GstBaseTransform * bt, GstCaps * incaps,
       goto error;
   }
 
+  if (filter->out_caps && !gst_caps_is_equal (filter->out_caps, outcaps)) {
+    if (filter->upload) {
+      gst_object_unref (filter->upload);
+      filter->upload = NULL;
+    }
+  }
+
   gst_caps_replace (&filter->out_caps, outcaps);
 
   GST_DEBUG ("set_caps %dx%d", GST_VIDEO_INFO_WIDTH (&filter->out_info),