soup: Don't store a strong reference to the logging object

Otherwise this causes a reference cycle between the session, the logger
and the logging object (i.e. the sink element or session wrapper).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1603>
This commit is contained in:
Sebastian Dröge 2022-01-29 12:56:22 +02:00 committed by GStreamer Marge Bot
parent bd6e1a9f70
commit 4ae3685ac4

View file

@ -90,8 +90,7 @@ gst_soup_util_log_setup (SoupSession * session, SoupLoggerLogLevel level,
/* Create a new logger and set body_size_limit to -1 (no limit) */ /* Create a new logger and set body_size_limit to -1 (no limit) */
logger = _soup_logger_new (level); logger = _soup_logger_new (level);
_soup_logger_set_printer (logger, gst_soup_util_log_printer_cb, _soup_logger_set_printer (logger, gst_soup_util_log_printer_cb, object, NULL);
gst_object_ref (object), (GDestroyNotify) gst_object_unref);
/* Attach logger to session */ /* Attach logger to session */
_soup_session_add_feature (session, (SoupSessionFeature *) logger); _soup_session_add_feature (session, (SoupSessionFeature *) logger);