Transcoder now deletes created files on error

This commit is contained in:
Lukas Prediger 2021-10-30 13:44:45 +03:00 committed by John Maguire
parent bb618efc5d
commit 3a40be6706
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));