From 08dc5d2961d5ff492034cb88992d36975693b59e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 28 May 2021 07:54:32 +0200 Subject: [PATCH] stream: Set the object name to the stream id Makes it more meaningful in debug logs (instead of streamNNNNN) Part-of: --- subprojects/gstreamer/gst/gststreams.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gstreamer/gst/gststreams.c b/subprojects/gstreamer/gst/gststreams.c index 6df80d1aa1..1a021870ee 100644 --- a/subprojects/gstreamer/gst/gststreams.c +++ b/subprojects/gstreamer/gst/gststreams.c @@ -241,6 +241,10 @@ gst_stream_set_stream_id (GstStream * stream, const gchar * stream_id) g_random_int (), g_random_int ()); } + /* We hold the object lock, replace directly */ + g_free (GST_OBJECT_NAME (stream)); + GST_OBJECT_NAME (stream) = g_strdup (stream->stream_id); + GST_OBJECT_UNLOCK (stream); if (!stream_id)