summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-02 12:06:20 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-02 12:06:20 +0100
commit3574212ee42b2bd924eb95d5c0f4f69ec9e0a2f0 (patch)
tree24e46f4f566bfb98aa48e9dab602ec1c8d0591d6 /src/lib/ffmpeg_examiner.cc
parent24d54ea7fe1ba128cf8d3521d6738fc73a7c623e (diff)
parent8fb0f4eaa6d91ca9369f45dd7a57c29149edaaac (diff)
Merge master.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
-rw-r--r--src/lib/ffmpeg_examiner.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc
index df12830f8..d9bcedfc5 100644
--- a/src/lib/ffmpeg_examiner.cc
+++ b/src/lib/ffmpeg_examiner.cc
@@ -176,7 +176,7 @@ FFmpegExaminer::video_size () const
ContentTime
FFmpegExaminer::video_length () const
{
- ContentTime const length = ContentTime::from_seconds (double (_format_context->duration) / AV_TIME_BASE);
+ ContentTime const length = ContentTime::from_seconds (double (_format_context->duration - _format_context->start_time) / AV_TIME_BASE);
return ContentTime (max (int64_t (1), length.get ()));
}