Transcoder: create output paths if they do not already exist

This commit is contained in:
Lukas Prediger 2021-08-20 21:34:51 +03:00
parent 300a87c32c
commit d673743a93
No known key found for this signature in database
GPG Key ID: DF7C5DA2E98A3428
1 changed files with 4 additions and 0 deletions

View File

@ -488,6 +488,10 @@ bool Transcoder::StartJob(const Job& job) {
g_object_set(src, "location", job.input.toUtf8().constData(), nullptr);
g_object_set(sink, "location", job.output.toUtf8().constData(), nullptr);
// Create target directory, if it does not exist
QFileInfo output_file_path(job.output);
output_file_path.dir().mkpath(".");
// Set callbacks
state->convert_element_ = convert;