Use toUtf8() not toLocal8Bit() when converting string for UNC path

Fixes #418
This commit is contained in:
Jonas Kvinge
2020-04-30 17:32:31 +02:00
parent 838c17e144
commit eb4ce1feab

View File

@@ -680,7 +680,7 @@ QByteArray GstEngine::FixupUrl(const QUrl &url) {
// Munge it back into a path that gstreamer will recognise. // Munge it back into a path that gstreamer will recognise.
if (url.scheme() == "file" && !url.host().isEmpty()) { if (url.scheme() == "file" && !url.host().isEmpty()) {
QString str = "file:////" + url.host() + url.path(); QString str = "file:////" + url.host() + url.path();
uri = str.toLocal8Bit(); uri = str.toUtf8();
} }
else if (url.scheme() == "cdda") { else if (url.scheme() == "cdda") {
QString str; QString str;
@@ -697,7 +697,7 @@ QByteArray GstEngine::FixupUrl(const QUrl &url) {
QString device = path.join("/"); QString device = path.join("/");
if (current_pipeline_) current_pipeline_->SetSourceDevice(device); if (current_pipeline_) current_pipeline_->SetSourceDevice(device);
} }
uri = str.toLocal8Bit(); uri = str.toUtf8();
} }
else { else {
uri = url.toEncoded(); uri = url.toEncoded();