[vlmc-devel] MLTFilter: Remove unneeded cast

Yikai Lu git at videolan.org
Wed Jun 29 08:20:11 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed Jun 29 13:20:13 2016 +0900| [64c20952d8a0760c84d2b5715e7203a3ba0eefec] | committer: Yikai Lu

MLTFilter: Remove unneeded cast

> https://code.videolan.org/videolan/vlmc/commit/64c20952d8a0760c84d2b5715e7203a3ba0eefec
---

 src/Backend/MLT/MLTFilter.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/Backend/MLT/MLTFilter.cpp b/src/Backend/MLT/MLTFilter.cpp
index 47e3169..91870f9 100644
--- a/src/Backend/MLT/MLTFilter.cpp
+++ b/src/Backend/MLT/MLTFilter.cpp
@@ -224,12 +224,8 @@ MLTFilter::length() const
 {
     auto length = m_filter->get_length();
 
-    if ( length == 0 )
-    {
-        auto producer = dynamic_cast<Mlt::Producer*>( m_connectedProducer );
-        if ( producer != nullptr )
-            length = producer->get_playtime();
-    }
+    if ( length == 0 && m_connectedProducer != nullptr )
+        length = m_connectedProducer->get_playtime();
 
     return length ? length : MLTInput::Unlimited;
 }



More information about the Vlmc-devel mailing list