Fix recovery of partial video MXF.
authorCarl Hetherington <cth@carlh.net>
Tue, 26 May 2015 10:47:52 +0000 (11:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 26 May 2015 10:47:52 +0000 (11:47 +0100)
src/lib/writer.cc
test/recover_test.cc

index f59ccb0f535e5f5e7c850be847146e9bfc4a99cf..650f8ac476c23676da570712882742e6c4995f43 100644 (file)
@@ -110,6 +110,13 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
        if (_film->encrypted ()) {
                _picture_mxf->set_key (_film->key ());
        }
+
+       _picture_mxf->set_file (
+               _film->internal_video_mxf_dir() / _film->internal_video_mxf_filename()
+               );
+
+       job->sub (_("Checking existing image data"));
+       check_existing_picture_mxf ();
        
        _picture_mxf_writer = _picture_mxf->start_write (
                _film->internal_video_mxf_dir() / _film->internal_video_mxf_filename(),
@@ -135,9 +142,6 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
                throw InvalidSignerError ();
        }
 
-       job->sub (_("Checking existing image data"));
-       check_existing_picture_mxf ();
-       
        _thread = new boost::thread (boost::bind (&Writer::thread, this));
 
        job->sub (_("Encoding image data"));
index e14832dce7b01a0486d7df6809a3750025fc620a..e57674488a601523d0452c69513df4b59ecd329f 100644 (file)
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE (recover_test)
                "build/test/recover_test/original.mxf"
                );
        
-//     boost::filesystem::resize_file (video, 2 * 1024 * 1024);
+       boost::filesystem::resize_file (video, 2 * 1024 * 1024);
 
        film->make_dcp ();
        wait_for_jobs ();