Fix error when analysing audio of DCPs with no audio content.
authorCarl Hetherington <cth@carlh.net>
Mon, 19 Nov 2018 20:42:33 +0000 (20:42 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 19 Nov 2018 20:42:33 +0000 (20:42 +0000)
src/lib/analyse_audio_job.cc

index 461b84b4f5dbaf4c2d6884770156550520ae29d2..5994bc71a7ec7338bed1e9457de2a4b04c9f53f2 100644 (file)
@@ -159,8 +159,9 @@ AnalyseAudioJob::run ()
                   gain was when we analysed it.
                */
                shared_ptr<const AudioContent> ac = _playlist->content().front()->audio;
-               DCPOMATIC_ASSERT (ac);
-               _analysis->set_analysis_gain (ac->gain ());
+               if (ac) {
+                       _analysis->set_analysis_gain (ac->gain());
+               }
        }
 
        _analysis->set_samples_per_point (_samples_per_point);