diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-10 16:38:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-12 09:13:51 +0100 |
| commit | b1dc9c3a2f7e55c9afc5bf2d5b465371b048e14f (patch) | |
| tree | 9968238c6c0511f044e6fcdb4abcc08b5eb28f27 /src/lib/ffmpeg_examiner.cc | |
| parent | 4a0ae92e28d7d1f0dd648d1b620efc324fdef161 (diff) | |
Remove all use of stringstream in an attempt to fix
the suspected thread-unsafe crash bugs on OS X.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 544cc11b9..847c141da 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -30,7 +30,6 @@ extern "C" { #include "ffmpeg_audio_stream.h" #include "ffmpeg_subtitle_stream.h" #include "util.h" -#include <locked_sstream.h> #include <boost/foreach.hpp> #include <iostream> @@ -351,38 +350,36 @@ FFmpegExaminer::sample_aspect_ratio () const string FFmpegExaminer::subtitle_stream_name (AVStream* s) const { - locked_stringstream n; + string n = stream_name (s); - n << stream_name (s); - - if (n.str().empty()) { - n << _("unknown"); + if (n.empty()) { + n = _("unknown"); } - return n.str (); + return n; } string FFmpegExaminer::stream_name (AVStream* s) const { - locked_stringstream n; + string n; if (s->metadata) { AVDictionaryEntry const * lang = av_dict_get (s->metadata, "language", 0, 0); if (lang) { - n << lang->value; + n = lang->value; } AVDictionaryEntry const * title = av_dict_get (s->metadata, "title", 0, 0); if (title) { - if (!n.str().empty()) { - n << " "; + if (!n.empty()) { + n += " "; } - n << title->value; + n += title->value; } } - return n.str (); + return n; } int |
