Fix missing audio mix transition on upper track

parent e164f1bf
......@@ -117,7 +117,7 @@ region
resize
resample
mono
transition
# Effects need extra GUI to create the resulting melt.xml with the corrected content
videostab
......@@ -135,6 +135,8 @@ avfilter.subtitles
avfilter.ssim
avfilter.stereo3d
avfilter.ass
avfilter.bbox
avfilter.bench
# Avfilter Effects with XML
avfilter.acompressor
......
......@@ -482,7 +482,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(const QList <TrackInfo> &tracks)
}
// Transitions
for (int i = 0; i < total; i++) {
for (int i = 0; i <= total; i++) {
if (i > 0) {
QDomElement transition = doc.createElement(QStringLiteral("transition"));
transition.setAttribute(QStringLiteral("always_active"), QStringLiteral("1"));
......@@ -519,7 +519,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(const QList <TrackInfo> &tracks)
tractor.appendChild(transition);
}
if (i >= lowestVideoTrack && tracks.at(i).type == VideoTrack) {
if (i > lowestVideoTrack && tracks.at(i - 1).type == VideoTrack) {
// Only add composite transition if both tracks are video
QDomElement transition = doc.createElement(QStringLiteral("transition"));
property = doc.createElement(QStringLiteral("property"));
......@@ -534,7 +534,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(const QList <TrackInfo> &tracks)
property = doc.createElement(QStringLiteral("property"));
property.setAttribute(QStringLiteral("name"), QStringLiteral("b_track"));
property.appendChild(doc.createTextNode(QString::number(i+1)));
property.appendChild(doc.createTextNode(QString::number(i)));
transition.appendChild(property);
property = doc.createElement(QStringLiteral("property"));
......
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