summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-09-16 10:10:46 +0200
committerCarl Hetherington <cth@carlh.net>2024-09-18 10:41:19 +0200
commita9cb7313f7846f8b2bf9f96d19cf28abd7caf7fc (patch)
tree020b1ed7922e97c9711641209efdab845cdf65fc /src/lib/dcp_subtitle_content.cc
parent5c5da23c412e9b922154f8934e16f3a51ff48bdc (diff)
Fix thinko in relative path change.
We have to canonicalise relative paths with respect to the film's directory on load, otherwise we try to use the relative path and it's interpreted against the current working directory. This unfortunately requires the film's directory to be piped into quite a lot of new places.
Diffstat (limited to 'src/lib/dcp_subtitle_content.cc')
-rw-r--r--src/lib/dcp_subtitle_content.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc
index cbd8638f3..b18d14318 100644
--- a/src/lib/dcp_subtitle_content.cc
+++ b/src/lib/dcp_subtitle_content.cc
@@ -49,8 +49,8 @@ DCPSubtitleContent::DCPSubtitleContent (boost::filesystem::path path)
text.push_back (make_shared<TextContent>(this, TextType::OPEN_SUBTITLE, TextType::OPEN_SUBTITLE));
}
-DCPSubtitleContent::DCPSubtitleContent (cxml::ConstNodePtr node, int version)
- : Content (node)
+DCPSubtitleContent::DCPSubtitleContent(cxml::ConstNodePtr node, boost::optional<boost::filesystem::path> film_directory, int version)
+ : Content (node, film_directory)
, _length (node->number_child<ContentTime::Type> ("Length"))
{
list<string> notes;