From ff02c27b53222592e394d7cde1c904b27a211488 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 11 May 2023 13:48:58 +0200 Subject: [PATCH] add_fonts_from_examiner() can be called multiple times with the same font in the case of closed captions with multiple tracks. Don't reuse the same font objects in this case, otherwise we will start with something like font, disambiguate it to 0_font, then disambiguate _that_ to 0_0_font. --- src/lib/dcp_content.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index cad775b24..7d835e618 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -831,8 +831,9 @@ add_fonts_from_examiner(shared_ptr text, vectorset_id(id_for_font_in_reel(font->id(), reel_number)); - text->add_font(font); + auto font_copy = make_shared(*font); + font_copy->set_id(id_for_font_in_reel(font->id(), reel_number)); + text->add_font(font_copy); } ++reel_number; } -- 2.30.2