From kde-commits Sat Jan 31 22:54:36 2015 From: Jean-Baptiste Mardelle Date: Sat, 31 Jan 2015 22:54:36 +0000 To: kde-commits Subject: [kdenlive/frameworks] src/bin: Fix handling of conditional transcoding Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=142274488502957 Git commit d724a380ab551aef75f58d9ab879b5f470b47f7c by Jean-Baptiste Mardel= le. 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 =3D clip->codec(true); QString videoCodec =3D clip->codec(false); - bool skipCondition =3D false; + bool noCodecInfo =3D false; if (audioCodec.isEmpty() && videoCodec.isEmpty()) { - skipCondition =3D true; + noCodecInfo =3D true; } for (int i =3D 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 =3D transcodeActions.at(i)->data().toStringLi= st(); if (data.count() > 4) { condition =3D 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(conditi= on.section('=3D', 1, 1) =3D=3D videoCodec); else if (condition.startsWith("acodec"))