Fix unnecessary condition.
[dcpomatic.git] / src / lib / util.cc
index 7824e7fed739f75d51063298d99ffe61fafcbb28..90d78b32e42dbf30edcf321fba6adf83e97b2b54 100644 (file)
@@ -388,7 +388,7 @@ DCPOMATIC_ENABLE_WARNINGS
 #endif
 
        Pango::init ();
-       dcp::init ();
+       dcp::init (tags_path());
 
 #if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_OSX)
        /* Render something to fontconfig to create its cache */
@@ -825,17 +825,15 @@ audio_channel_types (list<int> mapped, int channels)
                case dcp::CENTRE:
                case dcp::LS:
                case dcp::RS:
-               case dcp::LC:
-               case dcp::RC:
                case dcp::BSL:
                case dcp::BSR:
                        ++non_lfe;
                        break;
                case dcp::HI:
                case dcp::VI:
+               case dcp::MOTION_DATA:
                case dcp::SYNC_SIGNAL:
                case dcp::SIGN_LANGUAGE:
-               case dcp::UNUSED:
                case dcp::CHANNEL_COUNT:
                        break;
                }
@@ -955,7 +953,7 @@ void
 emit_subtitle_image (ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, shared_ptr<TextDecoder> decoder)
 {
        /* XXX: this is rather inefficient; decoding the image just to get its size */
-       FFmpegImageProxy proxy (sub.png_image());
+       FFmpegImageProxy proxy (sub.png_image(), VIDEO_RANGE_FULL);
        shared_ptr<Image> image = proxy.image().image;
        /* set up rect with height and width */
        dcpomatic::Rect<double> rect(0, 0, image->size().width / double(size.width), image->size().height / double(size.height));
@@ -1249,7 +1247,7 @@ decrypt_kdm_with_helpful_error (dcp::EncryptedKDM kdm)
                }
                if (!on_chain) {
                        throw KDMError (_("This KDM was not made for DCP-o-matic's decryption certificate."), e.what());
-               } else if (on_chain && kdm_subject_name != dc->leaf().subject()) {
+               } else if (kdm_subject_name != dc->leaf().subject()) {
                        throw KDMError (_("This KDM was made for DCP-o-matic but not for its leaf certificate."), e.what());
                } else {
                        throw;