diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-23 18:44:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-23 18:44:12 +0100 |
| commit | 90949746a252d8c707d552ab977fa4cb323e5316 (patch) | |
| tree | 8683603ea09c1821258d3f0200eae8b360edfc03 | |
| parent | 30fb65ed98aa322d22d370b6e7d66979d6daa6f7 (diff) | |
Revert use of AVFormatContext::start_time when computing the length
of videos. This appears to be wrong; niclasnornemark at gmail sent
a file of about a minute length with a start time of 1h something.
| -rw-r--r-- | ChangeLog | 9 | ||||
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 2 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2014-08-23 Carl Hetherington <cth@carlh.net> + + * Revert previous use of AVFormatContext::start_time when + computing the length of video. I think this is wrong, and + causes bits to be missed off the end of videos (and other + problems). + 2014-08-20 Carl Hetherington <cth@carlh.net> * Version 1.72.11 released. @@ -6,7 +13,7 @@ * Attempt to fix random crashes on OS X (especially during encodes) thought to be caused by multiple threads using (different) stringstreams - at the same time; see src/lib/safe_stringstream.h + at the same time; see src/lib/safe_stringstream. 2014-08-09 Carl Hetherington <cth@carlh.net> diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 5fb20ef2c..5ccc8028b 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 - _format_context->start_time) / AV_TIME_BASE) * video_frame_rate(); + VideoContent::Frame const length = (double (_format_context->duration) / AV_TIME_BASE) * video_frame_rate(); return max (1, length); } |
