Include video_frame_rate in TextContent identifier so that if (for
authorCarl Hetherington <cth@carlh.net>
Sat, 4 May 2019 00:06:54 +0000 (00:06 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 4 May 2019 00:06:54 +0000 (00:06 +0000)
example) some SRT subs are being burnt and their video frame rate is
changed we won't try to reuse the video that has been burnt with the
subs at the old frame rate.

src/lib/string_text_file_content.cc
src/lib/string_text_file_content.h
src/lib/text_content.cc

index b4362a7..b3f7f43 100644 (file)
@@ -100,3 +100,11 @@ StringTextFileContent::approximate_length () const
 {
        return DCPTime (_length, FrameRateChange());
 }
+
+string
+StringTextFileContent::identifier () const
+{
+       string s = Content::identifier ();
+       s += "_" + only_text()->identifier();
+       return s;
+}
index 936e894..8332317 100644 (file)
@@ -45,6 +45,7 @@ public:
        void as_xml (xmlpp::Node *, bool with_paths) const;
        DCPTime full_length (boost::shared_ptr<const Film> film) const;
        DCPTime approximate_length () const;
+       std::string identifier () const;
 
 private:
        ContentTime _length;
index e2f5264..772ed31 100644 (file)
@@ -399,7 +399,8 @@ TextContent::identifier () const
                + "_" + raw_convert<string> (outline_width())
                + "_" + raw_convert<string> (colour().get_value_or(dcp::Colour(255, 255, 255)).to_argb_string())
                + "_" + raw_convert<string> (dcp::effect_to_string(effect().get_value_or(dcp::NONE)))
-               + "_" + raw_convert<string> (effect_colour().get_value_or(dcp::Colour(0, 0, 0)).to_argb_string());
+               + "_" + raw_convert<string> (effect_colour().get_value_or(dcp::Colour(0, 0, 0)).to_argb_string())
+               + "_" + raw_convert<string> (_parent->video_frame_rate().get_value_or(0));
 
        /* XXX: I suppose really _fonts shouldn't be in here, since not all
           types of subtitle content involve fonts.