From 1d7f2c2b9aee5b6d8505cb9f9113cf87fe7ffff7 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 8 Aug 2023 01:29:40 +0900 Subject: [PATCH] hlssink2: Always use forward slash separator 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: --- subprojects/gst-plugins-bad/ext/hls/gsthlssink2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/hls/gsthlssink2.c b/subprojects/gst-plugins-bad/ext/hls/gsthlssink2.c index 9c06d14..d57939b 100644 --- a/subprojects/gst-plugins-bad/ext/hls/gsthlssink2.c +++ b/subprojects/gst-plugins-bad/ext/hls/gsthlssink2.c @@ -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); } -- 2.7.4