good:rtsp: Fix the issue that gst_uri_join_strings() construct missing uri 97/300397/7
authorjiyong.min <jiyong.min@samsung.com>
Mon, 23 Oct 2023 23:09:33 +0000 (08:09 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Tue, 24 Oct 2023 03:28:45 +0000 (12:28 +0900)
Change-Id: I09177a09255de0ec05cf70d06b1f4d83c9dafd7f

packaging/gstreamer.spec
subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c

index c6b4e10f02c2d857d71bd27fe658f51a56648015..f0e875e6d3558ec98d545be8d918d9553fc2cfea 100644 (file)
@@ -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
index 9e991326be4e7856a74cebc2fd1ced323f933b0a..f8e97cd48e974a904f06d28d8d71ac107f26706c 100644 (file)
@@ -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",