Revert "cuda: Fix GstCudaContext refcount bug"
authorSeungha Yang <seungha@centricular.com>
Mon, 2 May 2022 12:57:07 +0000 (21:57 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 2 May 2022 17:19:13 +0000 (17:19 +0000)
This reverts commit df7ee0e21518ab5586e4094f2089048f3767d5f5.

We should not unref it since gst_message_new_have_context()
takes ownership of the GstContext.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2342>

subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudautils.c

index 62a8297..68888a6 100644 (file)
@@ -236,7 +236,6 @@ gst_cuda_ensure_element_context (GstElement * element, gint device_id,
         context, *cuda_ctx);
     msg = gst_message_new_have_context (GST_OBJECT_CAST (element), context);
     gst_element_post_message (GST_ELEMENT_CAST (element), msg);
-    gst_context_unref (context);
   }
 
   return TRUE;