Fix failure to parse subrip where there are extra spaces in the time/position line.
[libsub.git] / src / raw_convert.h
index 6b9b68f456c2d73a61766455b3cee2838270d2a9..3afb8f787e704a24c7624b42085bd174cedbe269 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef LIBSUB_RAW_CONVERT_H
 #define LIBSUB_RAW_CONVERT_H
 
-#include <sstream>
+#include <locked_sstream.h>
 #include <iomanip>
 
 namespace sub {
@@ -32,7 +32,7 @@ template <typename P, typename Q>
 P
 raw_convert (Q v, int precision = 16)
 {
-       std::stringstream s;
+       locked_stringstream s;
        s.imbue (std::locale::classic ());
        s << std::setprecision (precision);
        s << v;