Fix some coverity-reported stuff.
[dcpomatic.git] / src / lib / writer.cc
index 7fd7464885303c5348df3d92b11a87ee9c0ebe65..42187dc6e78616a24673057bb4e9eb87802381aa 100644 (file)
@@ -87,6 +87,7 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
 
        _picture_asset->set_edit_rate (_film->video_frame_rate ());
        _picture_asset->set_size (fit_ratio_within (_film->container()->ratio(), _film->full_frame ()));
+       _picture_asset->set_interop (_film->interop ());
 
        if (_film->encrypted ()) {
                _picture_asset->set_key (_film->key ());
@@ -98,6 +99,7 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
        _sound_asset->set_edit_rate (_film->video_frame_rate ());
        _sound_asset->set_channels (_film->audio_channels ());
        _sound_asset->set_sampling_rate (_film->audio_frame_rate ());
+       _sound_asset->set_interop (_film->interop ());
 
        if (_film->encrypted ()) {
                _sound_asset->set_key (_film->key ());
@@ -539,7 +541,9 @@ Writer::check_existing_picture_mxf ()
                shared_ptr<Job> job = _job.lock ();
                assert (job);
 
-               job->set_progress (float (_first_nonexistant_frame) / N);
+               if (N > 0) {
+                       job->set_progress (float (_first_nonexistant_frame) / N);
+               }
 
                if (_film->three_d ()) {
                        if (!check_existing_picture_mxf_frame (mxf, _first_nonexistant_frame, EYES_LEFT)) {