diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index bcd514f74c..2431c14338 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -302,7 +302,7 @@ gst_file_sink_set_location (GstFileSink * sink, const gchar * location) /* we store the filename as we received it from the application. On Windows * this should be in UTF8 */ sink->filename = g_strdup (location); - sink->uri = gst_uri_construct ("file", sink->filename); + sink->uri = g_filename_to_uri (sink->filename, NULL, NULL); } else { sink->filename = NULL; sink->uri = NULL;