Fix incorrect day-of-month in LocalTime.
[libdcp.git] / src / mono_picture_mxf.cc
index 4af24008eb7d751e18bc91aad6a776776b9ee8c2..09311a01fb0a9cf39e131ee4a051e646879c91b4 100644 (file)
@@ -22,6 +22,7 @@
 #include "AS_DCP.h"
 #include "KM_fileio.h"
 #include "exceptions.h"
+#include "dcp_assert.h"
 #include "mono_picture_frame.h"
 #include "compose.hpp"
 
@@ -68,8 +69,12 @@ MonoPictureMXF::get_frame (int n) const
 }
 
 bool
-MonoPictureMXF::equals (shared_ptr<const Content> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+MonoPictureMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
 {
+       if (!dynamic_pointer_cast<const MonoPictureMXF> (other)) {
+               return false;
+       }
+       
        if (!MXF::equals (other, opt, note)) {
                return false;
        }
@@ -100,14 +105,14 @@ MonoPictureMXF::equals (shared_ptr<const Content> other, EqualityOptions opt, bo
        }
 
        shared_ptr<const MonoPictureMXF> other_picture = dynamic_pointer_cast<const MonoPictureMXF> (other);
-       assert (other_picture);
+       DCP_ASSERT (other_picture);
 
        for (int i = 0; i < _intrinsic_duration; ++i) {
                if (i >= other_picture->intrinsic_duration()) {
                        return false;
                }
                
-               note (PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration));
+               note (DCP_PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration));
                shared_ptr<const MonoPictureFrame> frame_A = get_frame (i);
                shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i);