good:rtsp: Fix the issue that gst_uri_join_strings() construct missing uri 98/300398/8 accepted/tizen/unified/20231025.093257 accepted/tizen/unified/20231025.120151
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 07:22:34 +0000 (16:22 +0900)
Change-Id: I09177a09255de0ec05cf70d06b1f4d83c9dafd7f

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

index f0e875e..4e1c702 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.22.0
-Release:        35
+Release:        36
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 9e99132..6703830 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 */
+          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",