summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-13 17:29:13 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-13 17:29:13 +0100
commit46d4173180f54450e819a0edcdac0ea76b219fde (patch)
treeb016bd17be0390e77b2022d746e88950bdc59d59 /src
parent04a0f5faeedab4d28e551751d8f81582f415c552 (diff)
Continue with comparison even if lengths differ.
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc2
-rw-r--r--src/picture_asset.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 30995a61..f585cc08 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -305,9 +305,7 @@ CPL::equals (CPL const & other, EqualityOptions opt, boost::function<void (NoteT
if (_length != other._length) {
stringstream s;
- s << "lengths differ (" << _length << " cf " << other._length << ")";
note (ERROR, String::compose ("lengths differ (%1 vs %2)", _length, other._length));
- return false;
}
if (_reels.size() != other._reels.size()) {
diff --git a/src/picture_asset.cc b/src/picture_asset.cc
index 6be50b6d..74a3a55b 100644
--- a/src/picture_asset.cc
+++ b/src/picture_asset.cc
@@ -275,6 +275,10 @@ MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, bo
assert (other_picture);
for (int i = 0; i < _intrinsic_duration; ++i) {
+ if (i >= other_picture->intrinsic_duration()) {
+ return false;
+ }
+
note (PROGRESS, "Comparing video frame " + lexical_cast<string> (i) + " of " + lexical_cast<string> (_intrinsic_duration));
shared_ptr<const MonoPictureFrame> frame_A = get_frame (i);
shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i);