summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-12 00:57:51 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-12 00:57:51 +0100
commitdf085fc0ea4f1a3f009de5a7a5bf9f241173bcba (patch)
tree597ff1fe90446aa684e5fede3a72217b0b5c3d1a /src/lib/ffmpeg.cc
parent1b576d63f5b5babda35c3995dd375e39baa16947 (diff)
Remove LocaleGuard and lexical_cast<> in favour of libdcp::raw_convert,
which should get things right with both decimal and thousands separators; LocaleGuard fixed decimal separators ok but not, it appears, thousands ones.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index 60eea6ec7..ed3e0721f 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -22,6 +22,7 @@ extern "C" {
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
+#include <libdcp/raw_convert.h>
#include "ffmpeg.h"
#include "ffmpeg_content.h"
#include "exceptions.h"
@@ -33,7 +34,7 @@ using std::string;
using std::cout;
using std::stringstream;
using boost::shared_ptr;
-using boost::lexical_cast;
+using libdcp::raw_convert;
boost::mutex FFmpeg::_mutex;
@@ -94,8 +95,8 @@ FFmpeg::setup_general ()
/* These durations are in microseconds, and represent how far into the content file
we will look for streams.
*/
- av_dict_set (&options, "analyzeduration", lexical_cast<string> (5 * 60 * 1e6).c_str(), 0);
- av_dict_set (&options, "probesize", lexical_cast<string> (5 * 60 * 1e6).c_str(), 0);
+ av_dict_set (&options, "analyzeduration", raw_convert<string> (5 * 60 * 1e6).c_str(), 0);
+ av_dict_set (&options, "probesize", raw_convert<string> (5 * 60 * 1e6).c_str(), 0);
if (avformat_open_input (&_format_context, 0, 0, &options) < 0) {
throw OpenFileError (_ffmpeg_content->path(0).string ());