diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
| commit | 08d62727f7f1c813cbc7041027fe4a52518623da (patch) | |
| tree | 756e38e4ad5ee2bdb51690e8a6fb149909c53712 /src/lib/ffmpeg_examiner.cc | |
| parent | 09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff) | |
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 3de62ad07..093df0989 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -121,6 +121,7 @@ FFmpegExaminer::video_frame_rate () const AVStream* s = _format_context->streams[_video_stream]; if (s->avg_frame_rate.num && s->avg_frame_rate.den) { + cout << "here we bitchen well are " << av_q2d (s->avg_frame_rate) << "\n"; return av_q2d (s->avg_frame_rate); } @@ -138,7 +139,7 @@ ContentTime FFmpegExaminer::video_length () const { ContentTime const length = ContentTime::from_seconds (double (_format_context->duration) / AV_TIME_BASE); - return ContentTime (1, length.get ()); + return ContentTime (max (int64_t (1), length.get ())); } string |
