Don't try to set empty languages on CCAP tracks.
authorCarl Hetherington <cth@carlh.net>
Fri, 20 Nov 2020 20:19:04 +0000 (21:19 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 20 Nov 2020 22:47:03 +0000 (23:47 +0100)
src/lib/reel_writer.cc

index fa84180..16b34d7 100644 (file)
@@ -708,7 +708,7 @@ ReelWriter::write (PlayerText subs, TextType type, optional<DCPTextTrack> track,
                        s->set_metadata (mxf_metadata());
                        if (type == TEXT_OPEN_SUBTITLE && !lang.empty()) {
                                s->set_language (lang.front());
-                       } else {
+                       } else if (track && !track->language.empty()) {
                                s->set_language (dcp::LanguageTag(track->language));
                        }
                        s->set_edit_rate (dcp::Fraction (_film->video_frame_rate (), 1));