Commit 1abf2cb6 authored by Brendan Davidson's avatar Brendan Davidson Committed by Julius Künzel
Browse files

Add error message when input and output files are the same - transcoding

When transcoding a file and the source and destination are the same, it would result in an output that is a little hard to determine what the cause is. This will just bring up a prompt that says the source and destination can't be the same
parent d8fd6be8
Pipeline #170933 passed with stage
in 7 minutes and 10 seconds
......@@ -147,6 +147,10 @@ void ClipTranscode::slotStartTransCode()
bool mltEncoding = s_url.endsWith(QLatin1String(".mlt")) || s_url.endsWith(QLatin1String(".kdenlive"));
if (QFile::exists(destination + extension)) {
if( destination + extension == s_url){ //If the source and destination are the same, ffmpeg will fail
KMessageBox::error(this, i18n("Source and destination file can't be the same"));
if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", destination + extension)) == KMessageBox::No) {
// Abort operation
if (m_automaticMode) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment