From: ChrisDuncanAnyvision Date: Tue, 10 Nov 2020 16:17:23 +0000 (+0000) Subject: rtspsrc: Use consistent URI hashed stream-id for UDP and TCP/Interleaved streams X-Git-Tag: 1.19.3~509^2~348 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5f5e712c648a19ecd7529f144d6d182670c88ae;p=platform%2Fupstream%2Fgstreamer.git rtspsrc: Use consistent URI hashed stream-id for UDP and TCP/Interleaved streams Part-of: --- diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 21321e8..b34e3c0 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2998,12 +2998,17 @@ gst_rtspsrc_handle_src_sink_event (GstPad * pad, GstObject * parent, switch (GST_EVENT_TYPE (event)) { case GST_EVENT_STREAM_START:{ - const gchar *upstream_id; + GChecksum *cs; + gchar *uri; gchar *stream_id; - gst_event_parse_stream_start (event, &upstream_id); - stream_id = g_strdup_printf ("%s/%s", upstream_id, stream->stream_id); - + cs = g_checksum_new (G_CHECKSUM_SHA256); + uri = self->conninfo.location; + g_checksum_update (cs, (const guchar *) uri, strlen (uri)); + stream_id = + g_strdup_printf ("%s/%s", g_checksum_get_string (cs), + stream->stream_id); + g_checksum_free (cs); gst_event_unref (event); event = gst_event_new_stream_start (stream_id); g_free (stream_id);