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 b4362a7d0e7bb9e4b40ef97e6b7f779170ff991a..b3f7f431e025fe14940159b0dced2c6fbbde3e2c 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 936e894d8a567e663edfb1c3602b3229b56c656d..83323172d3efb447227153647a008d6fca5c75c0 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 e2f5264dfdad889912be6806371389c8aff52777..772ed31f56fe1ed3dfdda31a95f72a1291abe2af 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.