aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-01-31 23:46:03 +0100
committerJean-Baptiste Mardelle <[email protected]>2015-01-31 23:46:03 +0100
commit84856a039c66d4ecdbffb68c2d17cff9b1fd540c (patch)
tree8ff942837e0cf3779dbd3172fa3d026a5f19d672
parent67e34ebce52402ec94513669c815f0c227577f14 (diff)
Fix stupid crash with custom transcoding params
-rw-r--r--data/kdenlivetranscodingrc1
-rw-r--r--src/bin/bin.cpp11
-rw-r--r--src/project/dialogs/slideshowclip.cpp5
3 files changed, 15 insertions, 2 deletions
diff --git a/data/kdenlivetranscodingrc b/data/kdenlivetranscodingrc
index 852a308..87359cb 100644
--- a/data/kdenlivetranscodingrc
+++ b/data/kdenlivetranscodingrc
@@ -16,6 +16,7 @@ DNxHD 720p 59.94 fps 145 Mb/s=-s 1280x720 -r 60000/1001 -vb 145000k -threads 2 -
Fix MPEG-1=-sameq -acodec copy -vcodec mpeg1video %1.mpg;Fix unplayable MPEG-1 files;;vcodec=mpeg1video
Fix Ogg Theora=-sameq -vcodec libtheora -acodec copy %1.ogv;Fix unplayable OGG Theora files;;vcodec=theora
Remux MPEG-2 PS/VOB=-vcodec copy -acodec copy %1.mpg;Fix audio sync in MPEG-2 vob files;;vcodec=mpeg2video
+Remux MPEG-2 PS/VOB=-vcodec copy -acodec copy %1.mpg;Fix audio sync in MPEG-2 vob files 2;
Lossless Matroska=-sn -vcodec huffyuv -acodec flac %1.mkv;High quality lossless encoding
Wav 48000Hz=-vn -ar 48000 %1.wav;Extract audio as WAV file;audio
Remux with MKV=-vcodec copy -acodec copy -sn %1.mkv
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index 2736489..70f8df2 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -911,9 +911,18 @@ void Bin::contextMenuEvent(QContextMenuEvent *event)
QString condition;
QString audioCodec = clip->codec(true);
QString videoCodec = clip->codec(false);
+ bool skipCondition = false;
+ if (audioCodec.isEmpty() && videoCodec.isEmpty()) {
+ skipCondition = true;
+ }
for (int i = 0; i < transcodeActions.count(); ++i) {
+ if (skipCondition) {
+ // No audio / video codec, this is an MLT clip, skip conditions
+ transcodeActions.at(i)->setEnabled(true);
+ continue;
+ }
data = transcodeActions.at(i)->data().toStringList();
- if (data.count() > 3) {
+ if (data.count() > 4) {
condition = data.at(4);
if (condition.startsWith("vcodec"))
transcodeActions.at(i)->setEnabled(condition.section('=', 1, 1) == videoCodec);
diff --git a/src/project/dialogs/slideshowclip.cpp b/src/project/dialogs/slideshowclip.cpp
index 0ad22e0..a03c1b8 100644
--- a/src/project/dialogs/slideshowclip.cpp
+++ b/src/project/dialogs/slideshowclip.cpp
@@ -288,7 +288,10 @@ QString SlideshowClip::selectedPath(const QUrl &url, bool isMime, QString extens
{
QString folder;
if (isMime) {
- folder = url.path() + QDir::separator();
+ folder = url.path();
+ if (!folder.endsWith(QDir::separator())) {
+ folder.append(QDir::separator());
+ }
// Check how many files we have
QDir dir(folder);
QStringList filters;