]> git.sesse.net Git - kdenlive/commitdiff
Keep compatibility for older projects which did not duplicate video only producers
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 11 Sep 2012 07:07:57 +0000 (09:07 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 11 Sep 2012 07:07:57 +0000 (09:07 +0200)
src/docclipbase.cpp

index 40ff96f4c261c29db57c383ef07e60fdfdb8be6c..876dadcde95b5ed466a25631d741ad2335322f39 100644 (file)
@@ -503,7 +503,9 @@ void DocClipBase::setProducer(Mlt::Producer *producer, bool reset, bool readProp
             else delete producer;
             return;
         } else if (id.endsWith("video")) {
-           int pos = id.section('_', 0, 0).toInt();
+           int pos = 0;
+           // Keep compatibility with older projects where video only producers were not track specific
+           if (id.contains('_')) pos = id.section('_', 0, 0).toInt();
             if (pos >= m_videoTrackProducers.count()) {
                 while (m_videoTrackProducers.count() - 1 < pos) {
                     m_videoTrackProducers.append(NULL);