Fix DCP audio rate with 96kHz sources.
authorCarl Hetherington <cth@carlh.net>
Sun, 9 Aug 2015 22:31:26 +0000 (23:31 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 Aug 2015 22:31:26 +0000 (23:31 +0100)
ChangeLog
src/lib/film.cc

index e221bbd15a3db02ec3851a78feed2bf536396f3f..e0f610217a7a73db044c6efc9e2341a017165522 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-09  Carl Hetherington  <cth@carlh.net>
+
+       * Fix various incorrect behaviours with 96kHz
+       audio sources.
+
 2015-08-06  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.1.36 released.
index 5e7bab0b7d7ee7af846ed387b37f813a6f078dde..a20a44e77c25fc194d95bec4f393972731465748 100644 (file)
@@ -1024,7 +1024,13 @@ Film::playlist_changed ()
 int
 Film::audio_frame_rate () const
 {
-       /* XXX */
+       BOOST_FOREACH (shared_ptr<Content> i, content ()) {
+               shared_ptr<AudioContent> a = dynamic_pointer_cast<AudioContent> (i);
+               if (a && a->has_rate_above_48k ()) {
+                       return 96000;
+               }
+       }
+
        return 48000;
 }