[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [krita/rempt/impex-refactoring] plugins/impex/video: Check whether the path is absolute
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2016-12-10 14:30:19
Message-ID: E1cFifL-0001ZY-HN () code ! kde ! org
[Download RAW message or body]

Git commit 5b011f37fa180c70d47ed29873f9c72381473038 by Boudewijn Rempt.
Committed on 10/12/2016 at 14:30.
Pushed by rempt into branch 'rempt/impex-refactoring'.

Check whether the path is absolute

In that case we don't want to ise the framesdir for the resulting
animation.

M  +8    -2    plugins/impex/video/video_saver.cpp

https://commits.kde.org/krita/5b011f37fa180c70d47ed29873f9c72381473038

diff --git a/plugins/impex/video/video_saver.cpp \
b/plugins/impex/video/video_saver.cpp index a070114a820..13d2c65ff77 100644
--- a/plugins/impex/video/video_saver.cpp
+++ b/plugins/impex/video/video_saver.cpp
@@ -208,7 +208,7 @@ bool VideoSaver::hasFFMpeg() const
 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()) {
         m_ffmpegPath = configuration->getString("ffmpeg_path");
@@ -226,7 +226,13 @@ KisImageBuilder_Result VideoSaver::encode(const QString \
&filename, KisProperties  
     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 QString suffix = info.suffix().toLower();
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic