diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-10-22 10:10:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-10-22 10:10:54 +0100 |
| commit | f90d74f7a0382f0dc63eef81bd553d7a7b38edb2 (patch) | |
| tree | b4f495accfc6f697563ec1931e75acd5c8b89ce4 /src/lib | |
| parent | 4b06a77805ea3fd7bc0829d8096f87b341c77832 (diff) | |
| parent | a7601beaa8983c9d012d9230ce66aa861f34e67f (diff) | |
Merge master.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ffmpeg.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index fa369dda4..4fe1c0448 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -106,7 +106,10 @@ FFmpeg::setup_general () for (uint32_t i = 0; i < _format_context->nb_streams; ++i) { AVStream* s = _format_context->streams[i]; - if (s->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + /* Files from iTunes sometimes have two video streams, one with the avg_frame_rate.num and .den set + to zero. Ignore these streams. + */ + if (s->codec->codec_type == AVMEDIA_TYPE_VIDEO && s->avg_frame_rate.num > 0 && s->avg_frame_rate.den > 0) { _video_stream = i; } } |
