From 29d609c8d2438e76de13bd1118e0ed6ea72ed45d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Tue, 11 Sep 2012 09:07:57 +0200 Subject: [PATCH] Keep compatibility for older projects which did not duplicate video only producers --- src/docclipbase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docclipbase.cpp b/src/docclipbase.cpp index 40ff96f4..876dadcd 100644 --- a/src/docclipbase.cpp +++ b/src/docclipbase.cpp @@ -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); -- 2.39.5