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 committed by John Maguire
parent a6fef97cac
commit 83d961f808
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;