projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b32ff2
)
Prevent resolve_fonts from adding duplicate fonts to its list.
author
Carl Hetherington
<cth@carlh.net>
Sat, 8 Jul 2017 22:23:03 +0000
(
00:23
+0200)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 8 Jul 2017 22:23:03 +0000
(
00:23
+0200)
src/interop_subtitle_asset.cc
patch
|
blob
|
history
diff --git
a/src/interop_subtitle_asset.cc
b/src/interop_subtitle_asset.cc
index cfd37cb8c85b92171d51a6e0b96c13c9eab81dee..54c27ff5225223ff21ae2489561459864bfb4c16 100644
(file)
--- a/
src/interop_subtitle_asset.cc
+++ b/
src/interop_subtitle_asset.cc
@@
-202,7
+202,15
@@
InteropSubtitleAsset::resolve_fonts (list<shared_ptr<Asset> > assets)
}
BOOST_FOREACH (shared_ptr<InteropLoadFontNode> j, _load_font_nodes) {
- if (font->file() && j->uri == font->file()->leaf().string ()) {
+ bool got = false;
+ BOOST_FOREACH (Font const & k, _fonts) {
+ if (k.load_id == j->id) {
+ got = true;
+ break;
+ }
+ }
+
+ if (!got && font->file() && j->uri == font->file()->leaf().string()) {
_fonts.push_back (Font (j->id, i->id(), font->file().get()));
}
}