[poppler] Branch 'poppler-0.12' - poppler/Annot.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Oct 28 11:22:32 PDT 2009


 poppler/Annot.cc |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 2b1ccee4be6cfe2eeaad6ee200506b0722037da6
Author: Ilya Gorenbein <igorenbein at finjan.com>
Date:   Wed Oct 28 19:20:41 2009 +0100

    There are some pdf where Aspect values are reals, use getNum
    
    Fixes bug 24733

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index c9b8dcf..cb6a381 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -3546,9 +3546,13 @@ void AnnotMovie::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
       Array* aspect = obj1.getArray();
       if (aspect->getLength() >= 2) {
 	Object tmp;
-	width = aspect->get(0, &tmp)->getInt();
+	if( aspect->get(0, &tmp)->isNum() ) {
+	  width = (int)floor( aspect->get(0, &tmp)->getNum() + 0.5 );
+	}
 	tmp.free();
-	height = aspect->get(1, &tmp)->getInt();
+	if( aspect->get(1, &tmp)->isNum() ) {
+	  height = (int)floor( aspect->get(1, &tmp)->getNum() + 0.5 );
+	}
 	tmp.free();
       }
     }


More information about the poppler mailing list