[vlmc-devel] MLTInput: Workaround for returning wrong length and height

Yikai Lu git at videolan.org
Tue Aug 16 03:37:04 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Aug 15 20:22:23 2016 -0500| [13672c73730f5f328ea837e9a2923c20c5289426] | committer: Yikai Lu

MLTInput: Workaround for returning wrong length and height

> https://code.videolan.org/videolan/vlmc/commit/13672c73730f5f328ea837e9a2923c20c5289426
---

 src/Backend/MLT/MLTInput.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/Backend/MLT/MLTInput.cpp b/src/Backend/MLT/MLTInput.cpp
index 9a8095e..074f3e8 100644
--- a/src/Backend/MLT/MLTInput.cpp
+++ b/src/Backend/MLT/MLTInput.cpp
@@ -285,13 +285,16 @@ MLTInput::aspectRatio() const
 int
 MLTInput::width() const
 {
-    return producer()->get_int( "width" );
+    // FIXME: Sometimes I can't get width and height
+    auto v = producer()->get_int( "width" );
+    return v > 0 ? v : Backend::instance()->profile().width();
 }
 
 int
 MLTInput::height() const
 {
-    return producer()->get_int( "height" );
+    auto v = producer()->get_int( "height" );
+    return v > 0 ? v : Backend::instance()->profile().height();
 }
 
 bool



More information about the Vlmc-devel mailing list