From: jiyong.min Date: Mon, 23 Oct 2023 23:09:33 +0000 (+0900) Subject: good:rtsp: Fix the issue that gst_uri_join_strings() construct missing uri X-Git-Tag: accepted/tizen/8.0/unified/20231031.064240~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F300397%2F7;p=platform%2Fupstream%2Fgstreamer.git good:rtsp: Fix the issue that gst_uri_join_strings() construct missing uri Change-Id: I09177a09255de0ec05cf70d06b1f4d83c9dafd7f --- diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index c6b4e10f02..f0e875e6d3 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -62,7 +62,7 @@ Name: %{_name} Version: 1.22.0 -Release: 34 +Release: 35 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index 9e991326be..f8e97cd48e 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -2612,7 +2612,24 @@ gst_rtspsrc_create_stream (GstRTSPSrc * src, GstSDPMessage * sdp, gint idx, if (g_strcmp0 (control_path, "*") == 0) control_path = g_strdup (base); else - stream->conninfo.location = gst_uri_join_strings (base, control_path); +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION + { + /* If uri does not end with slash, gst_uri_join_strings() ignores the last path. + * Similar issue exists, but there was no official patch yet. + * https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2614 + * So we added slash at the end of uri and we will monitor this issue. */ + if (!g_str_has_suffix (base, "/")) { + /* base with slash added at the end of uri */ + const gchar *base2 = g_strconcat(base, "/", NULL); + stream->conninfo.location = gst_uri_join_strings (base2, control_path); + g_free(base2); + } else { +#endif + stream->conninfo.location = gst_uri_join_strings (base, control_path); +#ifdef TIZEN_FEATURE_RTSP_MODIFICATION + } + } +#endif } } GST_DEBUG_OBJECT (src, " setup: %s",