Commit 1c06cfc9 authored by Halla Rempt's avatar Halla Rempt
Browse files

Check whether the path is absolute

In that case we don't want to ise the framesdir for the resulting
animation.
parent ff0b824d
...@@ -208,7 +208,7 @@ bool VideoSaver::hasFFMpeg() const ...@@ -208,7 +208,7 @@ bool VideoSaver::hasFFMpeg() const
KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisPropertiesConfigurationSP configuration) KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisPropertiesConfigurationSP configuration)
{ {
dbgFile << "ffmpeg" << m_ffmpegPath << "filename" << filename << "configuration" << configuration->toXML(); qDebug() << "ffmpeg" << m_ffmpegPath << "filename" << filename << "configuration" << configuration->toXML();
if (m_ffmpegPath.isEmpty()) { if (m_ffmpegPath.isEmpty()) {
m_ffmpegPath = configuration->getString("ffmpeg_path"); m_ffmpegPath = configuration->getString("ffmpeg_path");
...@@ -226,7 +226,13 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties ...@@ -226,7 +226,13 @@ KisImageBuilder_Result VideoSaver::encode(const QString &filename, KisProperties
const QDir framesDir(configuration->getString("directory")); const QDir framesDir(configuration->getString("directory"));
const QString resultFile = framesDir.absolutePath() + "/" + filename; QString resultFile;
if (QFileInfo(filename).isAbsolute()) {
resultFile = filename;
}
else {
resultFile = framesDir.absolutePath() + "/" + filename;
}
const QFileInfo info(resultFile); const QFileInfo info(resultFile);
const QString suffix = info.suffix().toLower(); const QString suffix = info.suffix().toLower();
......
Markdown is supported
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