[PATCH] Render::setProducer(): emit whole clip length with durationChanged

Mikko Rapeli mikko.rapeli at iki.fi
Tue Jan 17 20:37:17 UTC 2017


Currently only in&out zone length is sent with durationChanged.
One receiver is adjustRulerSize which should always adjust monitor ruler
to be the lenght of the full clip, not the length of the zone, when
previewing clips from bin.

If lenth of zone is used, the ruler shortens after playback to out point
and does not come to full clip length when selecting sub clips or the main
clip. Thus sub clip zones outside of the previewed zone out point can not
be previewed anymore.

I have no idea if this changes breaks time line rendering. Quick testing
does not show problems as clips can be dragged to time line and blayback
works and monitor ruler adjusts correctly to the start and end of clips
on timeline.

BUG: 375163

Signed-off-by: Mikko Rapeli <mikko.rapeli at iki.fi>
---
 src/renderer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/renderer.cpp b/src/renderer.cpp
index 868791d..ceb40b8 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -396,7 +396,7 @@ bool Render::setProducer(Mlt::Producer *producer, int position, bool isActive)
     if (isActive) {
         startConsumer();
     }
-    emit durationChanged(m_mltProducer->get_playtime() - 1, m_mltProducer->get_in());
+    emit durationChanged(m_mltProducer->get_length() - 1, m_mltProducer->get_in());
     position = m_mltProducer->position();
     emit rendererPosition(position);
     return true;
-- 
2.10.2



More information about the kdenlive mailing list