Continue with comparison even if lengths differ.
authorCarl Hetherington <cth@carlh.net>
Sat, 13 Jul 2013 16:29:13 +0000 (17:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Jul 2013 16:29:13 +0000 (17:29 +0100)
src/cpl.cc
src/picture_asset.cc

index 30995a6130eee5819aa23ef91e4b142fb6f32e5d..f585cc0811c4a9d34c82a8d59b00b239c66de046 100644 (file)
@@ -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()) {
index 6be50b6df1674611323948c138bd0326786702a3..74a3a55b979606754aee42bb5fcf1c884732d206 100644 (file)
@@ -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);