summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-01-13 23:34:35 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-15 10:21:59 +0100
commitdb22f81ccce9e1a5f205e6d8b3c0631fc039a173 (patch)
tree263c2a28165fe5d3cf03bae25d19cd60b0640bfd /src/lib/dcp_subtitle_decoder.h
parent7a301e22de2a3c47a81ebc4c9f19b68131b482aa (diff)
Fix handling of empty font IDs and default DCP fonts (#2721) (part of #2722).
Previously we used an empty font ID as the default for when a subtitle has no Font, but in #2721 we saw a DCP with an empty font ID which raised an assertion (because we'd already added our default font with the empty ID). Here we try to fix this (and also make the default font correctly be that from the first <LoadFont>).
Diffstat (limited to 'src/lib/dcp_subtitle_decoder.h')
-rw-r--r--src/lib/dcp_subtitle_decoder.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h
index 45a4999dd..9d0851253 100644
--- a/src/lib/dcp_subtitle_decoder.h
+++ b/src/lib/dcp_subtitle_decoder.h
@@ -19,8 +19,9 @@
*/
-#include "text_decoder.h"
#include "dcp_subtitle.h"
+#include "font_id_allocator.h"
+#include "text_decoder.h"
class DCPSubtitleContent;
@@ -44,4 +45,7 @@ private:
std::vector<std::shared_ptr<const dcp::Subtitle>>::const_iterator _next;
dcp::SubtitleStandard _subtitle_standard;
+
+ std::shared_ptr<dcp::SubtitleAsset> _asset;
+ FontIDAllocator _font_id_allocator;
};