X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg.cc;h=adc5c224c6f4e8ea408287de3a7360f3cb3e25fc;hb=f4f6a2504e5fedb67513689eaeac9dd88ee38ca9;hp=17ec564d321fa04fbec6f1760816500fc53a53e5;hpb=e4b5df4195ca28686a3e33c7d8288ee0065818a0;p=dcpomatic.git diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 17ec564d3..adc5c224c 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -165,6 +165,11 @@ FFmpeg::setup_general () _video_stream = video_stream_undefined_frame_rate.get(); } + /* Ignore video streams with crazy frame rates. These are usually things like album art on MP3s. */ + if (_video_stream && av_q2d(av_guess_frame_rate(_format_context, _format_context->streams[_video_stream.get()], 0)) > 1000) { + _video_stream = optional(); + } + /* Hack: if the AVStreams have duplicate IDs, replace them with our own. We use the IDs so that we can cope with VOBs, in which streams move about in index but remain with the same ID in different