diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-26 00:18:07 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-26 00:18:07 +0100 |
| commit | 1711d2804cb0a24b1883a991b46a8842bdd24415 (patch) | |
| tree | 7804bf8f30bc594ea1bfb6f681df48db64f92453 /src | |
| parent | c38648f30eb24c88e2af2927ba60acbf7e353fe8 (diff) | |
Account for FFmpeg content start_time being non-zero:
Reported-by: Sumit Guha
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index ec090ed61..d73063083 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -137,7 +137,7 @@ FFmpegExaminer::video_size () const VideoContent::Frame FFmpegExaminer::video_length () const { - VideoContent::Frame const length = (double (_format_context->duration) / AV_TIME_BASE) * video_frame_rate(); + VideoContent::Frame const length = (double (_format_context->duration - _format_context->start_time) / AV_TIME_BASE) * video_frame_rate(); return max (1, length); } |
