Merge master.
[dcpomatic.git] / src / lib / dcp_video.cc
index 9b1c8c33eae12cf36d214cbd81b84af99e9e7ae8..d849866512d4cdc0e983ca42201631fe3fe88d70 100644 (file)
@@ -34,7 +34,6 @@
 #include <stdexcept>
 #include <cstdio>
 #include <iomanip>
-#include <sstream>
 #include <iostream>
 #include <fstream>
 #include <unistd.h>
@@ -67,7 +66,6 @@
 #include "i18n.h"
 
 using std::string;
-using std::stringstream;
 using std::cout;
 using boost::shared_ptr;
 using boost::lexical_cast;
@@ -282,10 +280,9 @@ DCPVideo::encode_remotely (ServerDescription serv)
        LOG_GENERAL (N_("Sending frame %1 to remote"), _index);
        
        /* Send XML metadata */
-       stringstream xml;
-       doc.write_to_stream (xml, "UTF-8");
-       socket->write (xml.str().length() + 1);
-       socket->write ((uint8_t *) xml.str().c_str(), xml.str().length() + 1);
+       string xml = doc.write_to_string ("UTF-8");
+       socket->write (xml.length() + 1);
+       socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
 
        /* Send binary data */
        _frame->send_binary (socket, _burn_subtitles);