Transcoder now deletes created files on error

This commit is contained in:
Lukas Prediger 2021-10-30 13:44:45 +03:00
parent 2a4e9596b6
commit 942516c840
No known key found for this signature in database
GPG Key ID: DF7C5DA2E98A3428
1 changed files with 5 additions and 0 deletions

View File

@ -432,6 +432,11 @@ void Transcoder::JobState::ReportError(GstMessage* msg) {
g_error_free(error);
free(debugs);
// clean up output file if it was already created
if (QFile::exists(job_.output)) {
QFile::remove(job_.output);
}
emit parent_->LogLine(
tr("Error processing %1: %2")
.arg(UrlToLocalFileIfPossible(job_.input), message));