Fix Gb -> GB confusion (thanks Rob van Nieuwkerk).
[dcpomatic.git] / src / lib / film.cc
index d27b15a65e9af124ee7db2d23f8e864197abe7b2..11efcc7523575f2d927bdafd010fa26ddc231b09 100644 (file)
@@ -288,6 +288,8 @@ Film::audio_analysis_path (shared_ptr<const Playlist> playlist) const
                digester.add (audio_processor()->id ());
        }
 
+       digester.add (audio_channels());
+
        p /= digester.get ();
        return p;
 }
@@ -1213,12 +1215,9 @@ Film::playlist_order_changed ()
 int
 Film::audio_frame_rate () const
 {
-       BOOST_FOREACH (shared_ptr<Content> i, content ()) {
-               if (i->audio && i->audio->has_rate_above_48k ()) {
-                       return 96000;
-               }
-       }
-
+       /* It seems that nobody makes 96kHz DCPs at the moment, so let's avoid them.
+          See #1436.
+       */
        return 48000;
 }
 
@@ -1357,8 +1356,8 @@ Film::make_kdms (
                                i->recipient.get(),
                                i->trusted_device_thumbprints(),
                                cpl_file,
-                               dcp::LocalTime (from, i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()),
-                               dcp::LocalTime (until, i->cinema->utc_offset_hour(), i->cinema->utc_offset_minute()),
+                               dcp::LocalTime (from,  i->cinema ? i->cinema->utc_offset_hour() : 0, i->cinema ? i->cinema->utc_offset_minute() : 0),
+                               dcp::LocalTime (until, i->cinema ? i->cinema->utc_offset_hour() : 0, i->cinema ? i->cinema->utc_offset_minute() : 0),
                                formulation,
                                disable_forensic_marking_picture,
                                disable_forensic_marking_audio
@@ -1383,7 +1382,7 @@ Film::required_disk_space () const
 /** This method checks the disk that the Film is on and tries to decide whether or not
  *  there will be enough space to make a DCP for it.  If so, true is returned; if not,
  *  false is returned and required and available are filled in with the amount of disk space
- *  required and available respectively (in Gb).
+ *  required and available respectively (in GB).
  *
  *  Note: the decision made by this method isn't, of course, 100% reliable.
  */
@@ -1493,7 +1492,7 @@ Film::reels () const
                shared_ptr<Content> last_video;
                BOOST_FOREACH (shared_ptr<Content> c, content ()) {
                        if (c->video) {
-                               BOOST_FOREACH (DCPTime t, c->reel_split_points()) {
+                               BOOST_FOREACH (DCPTime t, c->reel_split_points(shared_from_this())) {
                                        if (last_split) {
                                                p.push_back (DCPTimePeriod (last_split.get(), t));
                                        }