diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-04 23:58:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-05 17:09:05 +0100 |
| commit | 5b27df19b23123995f812ed5624410d2d939223a (patch) | |
| tree | d508017e22d4777c41b57a2b704ec56b367b3ef8 /src/lib/ffmpeg.cc | |
| parent | 43cca4d3a11e077b3e75c713b95942cc3afc9eb1 (diff) | |
Don't use video streams with AV_DISPOSITION_ATTACHED_PIC (#2349).
These are seen in MP3 files for cover art.
Diffstat (limited to 'src/lib/ffmpeg.cc')
| -rw-r--r-- | src/lib/ffmpeg.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index a500e8df3..d9df232df 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -127,7 +127,7 @@ FFmpeg::setup_general () for (uint32_t i = 0; i < _format_context->nb_streams; ++i) { auto stream = _format_context->streams[i]; - if (stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && avcodec_find_decoder(stream->codecpar->codec_id)) { + if (stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && avcodec_find_decoder(stream->codecpar->codec_id) && stream->disposition != AV_DISPOSITION_ATTACHED_PIC) { auto const frame_rate = av_q2d(stream->avg_frame_rate); if (frame_rate < 1 || frame_rate > 1000) { /* Ignore video streams with crazy frame rates. These are usually things like album art on MP3s. */ |
