A couple of bug fixes.
authorCarl Hetherington <cth@carlh.net>
Mon, 21 Jan 2013 20:20:38 +0000 (20:20 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 21 Jan 2013 20:20:38 +0000 (20:20 +0000)
NOTES
src/lib/writer.cc

diff --git a/NOTES b/NOTES
index 365db34de45eca7a72712dfb36460eb68ed3380a..245017e0d455bbef8cebb40b9f1fd9c5d1ae394e 100644 (file)
--- a/NOTES
+++ b/NOTES
@@ -1,5 +1,4 @@
 
 ... perhaps generate the CPL hash on the fly
-Write hashes of frames after successful write.
 Make check of hashes optional; recovery in general
 Fix multi-reel or remove it
\ No newline at end of file
index b94ff3c24072132ec764f6d2d9d5174b550cf8e8..df6f20791ea53bd030c334a9ce2616f90e5ed52e 100644 (file)
@@ -57,7 +57,7 @@ Writer::Writer (shared_ptr<const Film> f)
                                String::compose ("audio_%1.mxf", 0),
                                DCPFrameRate (_film->frames_per_second()).frames_per_second,
                                _film->audio_channels(),
-                               _film->audio_stream()->sample_rate()
+                               dcp_audio_sample_rate (_film->audio_stream()->sample_rate())
                                )
                        );
 
@@ -196,10 +196,11 @@ Writer::finish ()
        _picture_asset_writer->finalize ();
        _sound_asset_writer->finalize ();
 
-
-       int const frames = _film->dcp_intrinsic_duration().get();
+       int const frames = _last_written_frame + 1;
        int const duration = frames - _film->trim_start() - _film->trim_end();
        
+       _film->set_intrinsic_duration (frames);
+       
        _picture_asset->set_entry_point (_film->trim_start ());
        _picture_asset->set_duration (duration);
        _sound_asset->set_entry_point (_film->trim_start ());