summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-08-23 22:50:40 +0100
committerCarl Hetherington <cth@carlh.net>2014-08-23 22:50:40 +0100
commit8c7a308c03e4b4196b4e2379a26d432b100ae2b1 (patch)
tree605c8b62f56c5f9be2ff77161eb18ac372083a35 /src/lib/ffmpeg_examiner.cc
parent04acfa42cdffd5938358847ebee822399ef978e6 (diff)
parenta6d6a794b28c3b3e6679f01c1890f396453eb5ac (diff)
Merge master.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
-rw-r--r--src/lib/ffmpeg_examiner.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc
index 62b909b1d..48d85da6f 100644
--- a/src/lib/ffmpeg_examiner.cc
+++ b/src/lib/ffmpeg_examiner.cc
@@ -26,13 +26,13 @@ extern "C" {
#include "ffmpeg_audio_stream.h"
#include "ffmpeg_subtitle_stream.h"
#include "util.h"
+#include "safe_stringstream.h"
#include "i18n.h"
using std::string;
using std::cout;
using std::max;
-using std::stringstream;
using boost::shared_ptr;
using boost::optional;
@@ -176,14 +176,14 @@ FFmpegExaminer::video_size () const
ContentTime
FFmpegExaminer::video_length () const
{
- ContentTime const length = ContentTime::from_seconds (double (_format_context->duration - _format_context->start_time) / AV_TIME_BASE);
+ ContentTime const length = ContentTime::from_seconds (double (_format_context->duration) / AV_TIME_BASE);
return ContentTime (max (ContentTime::Type (1), length.get ()));
}
string
FFmpegExaminer::audio_stream_name (AVStream* s) const
{
- stringstream n;
+ SafeStringStream n;
n << stream_name (s);
@@ -199,7 +199,7 @@ FFmpegExaminer::audio_stream_name (AVStream* s) const
string
FFmpegExaminer::subtitle_stream_name (AVStream* s) const
{
- stringstream n;
+ SafeStringStream n;
n << stream_name (s);
@@ -213,7 +213,7 @@ FFmpegExaminer::subtitle_stream_name (AVStream* s) const
string
FFmpegExaminer::stream_name (AVStream* s) const
{
- stringstream n;
+ SafeStringStream n;
if (s->metadata) {
AVDictionaryEntry const * lang = av_dict_get (s->metadata, "language", 0, 0);