gluploadelement: Fix caps leak
authorSeungha Yang <seungha.yang@navercorp.com>
Fri, 29 Mar 2019 03:42:45 +0000 (12:42 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Fri, 29 Mar 2019 03:42:45 +0000 (12:42 +0900)
gst_event_new_caps() does not take ownership of the caps

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/885

ext/gl/gstgluploadelement.c

index 30af7d0a3b861207b66f734a1fec185b7731e2e2..aec9c6cfe1ef9b16462a2e7e5a8319d1c10fb91e 100644 (file)
@@ -249,6 +249,7 @@ again:
      * Reconfiguring must be synchronous to avoid dropping the current
      * buffer */
     gst_pad_send_event (sinkpad, gst_event_new_caps (incaps));
+    gst_caps_unref (incaps);
     if (!gst_pad_needs_reconfigure (GST_BASE_TRANSFORM_SRC_PAD (bt))) {
       GST_DEBUG_OBJECT (bt, "Retry uploading with new caps");
       goto again;