[poppler] poppler/Movie.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 19 08:57:58 UTC 2019
poppler/Movie.cc | 82 ++++++++++++++++++++++++++-----------------------------
1 file changed, 39 insertions(+), 43 deletions(-)
New commits:
commit 7dd5405d98857e684c46a27a1abde93ba171f313
Author: Evgeny Stambulchik <fnevgeny at gmail.com>
Date: Wed Jun 19 08:57:55 2019 +0000
Fix typos preventing parsing of start&duration
diff --git a/poppler/Movie.cc b/poppler/Movie.cc
index 1a540237..f0de4fae 100644
--- a/poppler/Movie.cc
+++ b/poppler/Movie.cc
@@ -48,57 +48,53 @@ MovieActivationParameters::~MovieActivationParameters() {
void MovieActivationParameters::parseMovieActivation(const Object* aDict) {
Object obj1 = aDict->dictLookup("Start");
- if (obj1.isNull()) {
- if (obj1.isInt()) {
- // If it is representable as an integer (subject to the implementation limit for
- // integers, as described in Appendix C), it should be specified as such.
-
- start.units = obj1.getInt();
- } else if (obj1.isString()) {
- // If it is not representable as an integer, it should be specified as an 8-byte
- // string representing a 64-bit twos-complement integer, most significant
- // byte first.
-
+ if (obj1.isInt()) {
+ // If it is representable as an integer (subject to the implementation limit for
+ // integers, as described in Appendix C), it should be specified as such.
+
+ start.units = obj1.getInt();
+ } else if (obj1.isString()) {
+ // If it is not representable as an integer, it should be specified as an 8-byte
+ // string representing a 64-bit twos-complement integer, most significant
+ // byte first.
+
+ // UNSUPPORTED
+ } else if (obj1.isArray()) {
+ Array* a = obj1.getArray();
+
+ Object tmp = a->get(0);
+ if (tmp.isInt()) {
+ start.units = tmp.getInt();
+ }
+ if (tmp.isString()) {
// UNSUPPORTED
- } else if (obj1.isArray()) {
- Array* a = obj1.getArray();
-
- Object tmp = a->get(0);
- if (tmp.isInt()) {
- start.units = tmp.getInt();
- }
- if (tmp.isString()) {
- // UNSUPPORTED
- }
+ }
- tmp = a->get(1);
- if (tmp.isInt()) {
- start.units_per_second = tmp.getInt();
- }
+ tmp = a->get(1);
+ if (tmp.isInt()) {
+ start.units_per_second = tmp.getInt();
}
}
obj1 = aDict->dictLookup("Duration");
- if (obj1.isNull()) {
- if (obj1.isInt()) {
- duration.units = obj1.getInt();
- } else if (obj1.isString()) {
+ if (obj1.isInt()) {
+ duration.units = obj1.getInt();
+ } else if (obj1.isString()) {
+ // UNSUPPORTED
+ } else if (obj1.isArray()) {
+ Array* a = obj1.getArray();
+
+ Object tmp = a->get(0);
+ if (tmp.isInt()) {
+ duration.units = tmp.getInt();
+ }
+ if (tmp.isString()) {
// UNSUPPORTED
- } else if (obj1.isArray()) {
- Array* a = obj1.getArray();
-
- Object tmp = a->get(0);
- if (tmp.isInt()) {
- duration.units = tmp.getInt();
- }
- if (tmp.isString()) {
- // UNSUPPORTED
- }
+ }
- tmp = a->get(1);
- if (tmp.isInt()) {
- duration.units_per_second = tmp.getInt();
- }
+ tmp = a->get(1);
+ if (tmp.isInt()) {
+ duration.units_per_second = tmp.getInt();
}
}
More information about the poppler
mailing list