Add some more logging to checking of existing picture MXFs.
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Jul 2013 11:24:36 +0000 (12:24 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Jul 2013 11:24:36 +0000 (12:24 +0100)
src/lib/film.cc
src/lib/writer.cc

index 9b7d1bee904d7cd6da196f2c60a2b833083081c9..d92d7a9777a477dad28644a2a2274b0ec298b3fa 100644 (file)
@@ -245,7 +245,6 @@ Film::info_dir () const
 string
 Film::internal_video_mxf_dir () const
 {
-       boost::filesystem::path p;
        return dir ("video");
 }
 
index 177e929aebf2e64c989f0d4146ace0e0c296f82a..1a6daa1db35156343bc15399863e26224b84243f 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include <fstream>
+#include <cerrno>
 #include <libdcp/picture_asset.h>
 #include <libdcp/sound_asset.h>
 #include <libdcp/picture_frame.h>
@@ -352,8 +353,9 @@ Writer::check_existing_picture_mxf ()
        boost::filesystem::path p;
        p /= _film->internal_video_mxf_dir ();
        p /= _film->internal_video_mxf_filename ();
-       FILE* mxf = fopen (p.string().c_str(), N_("rb"));
+       FILE* mxf = fopen (p.string().c_str(), "rb");
        if (!mxf) {
+               _film->log()->log (String::compose ("Could not open existing MXF at %1 (errno=%2)", p.string(), errno));
                return;
        }