Don't add fonts to SMPTE closed caption MXFs (#2505).
authorCarl Hetherington <cth@carlh.net>
Wed, 5 Apr 2023 20:25:03 +0000 (22:25 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 5 Apr 2023 20:25:03 +0000 (22:25 +0200)
src/lib/reel_writer.cc

index 8bd15a575581a5126a62b856b4b5595bd6eda958..5d9f4dae0d9a19e1af95c1dd19b08ffc10ad4fe0 100644 (file)
@@ -491,16 +491,18 @@ maybe_add_text (
        shared_ptr<Result> reel_asset;
 
        if (asset) {
-               if (film->interop()) {
-                       if (chosen_interop_font) {
-                               /* We only add one font, as Interop will ignore subsequent ones (and some validators will
-                                * complain if they are even present)
-                                */
-                               asset->add_font(fonts.get(chosen_interop_font), chosen_interop_font->data().get_value_or(default_font));
-                       }
-               } else {
-                       for (auto const& font: fonts.map()) {
-                               asset->add_font(font.second, font.first->data().get_value_or(default_font));
+               if (!std::is_same<Result, dcp::ReelClosedCaptionAsset>::value) {
+                       if (film->interop()) {
+                               if (chosen_interop_font) {
+                                       /* We only add one font, as Interop will ignore subsequent ones (and some validators will
+                                        * complain if they are even present)
+                                        */
+                                       asset->add_font(fonts.get(chosen_interop_font), chosen_interop_font->data().get_value_or(default_font));
+                               }
+                       } else {
+                               for (auto const& font: fonts.map()) {
+                                       asset->add_font(font.second, font.first->data().get_value_or(default_font));
+                               }
                        }
                }