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

List:       kde-commits
Subject:    [kdenlive/frameworks] src/bin: Fix handling of conditional transcoding
From:       Jean-Baptiste Mardelle <jb () kdenlive ! org>
Date:       2015-01-31 22:54:36
Message-ID: E1YHgw0-0006gm-MJ () scm ! kde ! org
[Download RAW message or body]

Git commit d724a380ab551aef75f58d9ab879b5f470b47f7c by Jean-Baptiste Mardelle.
Committed on 31/01/2015 at 22:54.
Pushed by mardelle into branch 'frameworks'.

Fix handling of conditional transcoding

M  +11   -7    src/bin/bin.cpp

http://commits.kde.org/kdenlive/d724a380ab551aef75f58d9ab879b5f470b47f7c

diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index 70f8df2..ba1b637 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -911,19 +911,23 @@ void Bin::contextMenuEvent(QContextMenuEvent *event)
                     QString condition;
                     QString audioCodec = clip->codec(true);
                     QString videoCodec = clip->codec(false);
-                    bool skipCondition = false;
+                    bool noCodecInfo = false;
                     if (audioCodec.isEmpty() && videoCodec.isEmpty()) {
-                        skipCondition = true;
+                        noCodecInfo = 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() > 4) {
                             condition = data.at(4);
+                            if (condition.isEmpty()) {
+                                transcodeActions.at(i)->setEnabled(true);
+                                continue;
+                            }
+                            if (noCodecInfo) {
+                                // No audio / video codec, this is an MLT clip, \
disable conditionnal transcoding +                                \
transcodeActions.at(i)->setEnabled(false); +                                continue;
+                            }
                             if (condition.startsWith("vcodec"))
                                 \
transcodeActions.at(i)->setEnabled(condition.section('=', 1, 1) == videoCodec);  else \
if (condition.startsWith("acodec"))


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

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