hlssink2: Always use forward slash separator
authorSeungha Yang <seungha@centricular.com>
Mon, 7 Aug 2023 16:29:40 +0000 (01:29 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 8 Aug 2023 09:49:15 +0000 (10:49 +0100)
g_build_filename() will insert back slash on Windows, and resulting
playlist will contain media segment path with back slash if
"playlist-root" property is specified

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5161>

subprojects/gst-plugins-bad/ext/hls/gsthlssink2.c

index 9c06d14..d57939b 100644 (file)
@@ -447,7 +447,9 @@ gst_hls_sink2_handle_message (GstBin * bin, GstMessage * message)
             entry_location = g_path_get_basename (sink->current_location);
           } else {
             gchar *name = g_path_get_basename (sink->current_location);
-            entry_location = g_build_filename (sink->playlist_root, name, NULL);
+            /* g_build_filename() will insert back slash on Windows */
+            entry_location = g_build_path ("/",
+                sink->playlist_root, name, NULL);
             g_free (name);
           }