Remove all use of stringstream in an attempt to fix
[dcpomatic.git] / src / lib / dcp_content.cc
index 295f33b3c4560955ecac9d2d8201945153fadc8e..b41e31c0cc684a76f82e39ff90df5a478b61ac84 100644 (file)
@@ -239,14 +239,13 @@ DCPContent::full_length () const
 string
 DCPContent::identifier () const
 {
-       SafeStringStream s;
-       s << Content::identifier() << "_" << video->identifier() << "_";
+       string s = Content::identifier() + "_" + video->identifier() + "_";
        if (subtitle) {
-               s << subtitle->identifier () << " ";
+               s += subtitle->identifier () + " ";
        }
-       s << (_reference_video ? "1" : "0")
-         << (_reference_subtitle ? "1" : "0");
-       return s.str ();
+
+       s += string (_reference_video ? "1" : "0") + string (_reference_subtitle ? "1" : "0");
+       return s;
 }
 
 void
@@ -332,7 +331,7 @@ DCPContent::reels () const
        list<DCPTimePeriod> p;
        scoped_ptr<DCPDecoder> decoder;
        try {
-               decoder.reset (new DCPDecoder (shared_from_this(), film()->log(), false));
+               decoder.reset (new DCPDecoder (shared_from_this(), film()->log()));
        } catch (...) {
                /* Could not load the DCP; guess reels */
                list<DCPTimePeriod> p;
@@ -403,7 +402,7 @@ DCPContent::can_reference_video (list<string>& why_not) const
 bool
 DCPContent::can_reference_audio (list<string>& why_not) const
 {
-        DCPDecoder decoder (shared_from_this(), film()->log(), false);
+        DCPDecoder decoder (shared_from_this(), film()->log());
         BOOST_FOREACH (shared_ptr<dcp::Reel> i, decoder.reels()) {
                 if (!i->main_sound()) {
                         why_not.push_back (_("The DCP does not have sound in all reels."));
@@ -417,7 +416,7 @@ DCPContent::can_reference_audio (list<string>& why_not) const
 bool
 DCPContent::can_reference_subtitle (list<string>& why_not) const
 {
-        DCPDecoder decoder (shared_from_this(), film()->log(), false);
+        DCPDecoder decoder (shared_from_this(), film()->log());
         BOOST_FOREACH (shared_ptr<dcp::Reel> i, decoder.reels()) {
                 if (!i->main_subtitle()) {
                         why_not.push_back (_("The DCP does not have subtitles in all reels."));