Remove erroneous call to optional_node_child().
[dcpomatic.git] / src / lib / text_content.cc
index ac49be474e1ae70c4685bfaa5b5d93df966a8bd0..d000f83723dea316aa4d5c63b6b1c32912cf9a28 100644 (file)
@@ -100,10 +100,6 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
                return c;
        }
 
-       if (!node->optional_node_child("Text")) {
-               return list<shared_ptr<TextContent> >();
-       }
-
        list<shared_ptr<TextContent> > c;
        BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Text")) {
                c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));
@@ -399,15 +395,14 @@ 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.
        */
        BOOST_FOREACH (shared_ptr<Font> f, _fonts) {
-               for (int i = 0; i < FontFiles::VARIANTS; ++i) {
-                       s += "_" + f->file(static_cast<FontFiles::Variant>(i)).get_value_or("Default").string();
-               }
+               s += "_" + f->file().get_value_or("Default").string();
        }
 
        /* The DCP track and language are for metadata only, and don't affect