]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/utils.c
avformat/utils: Do not wait for more than 1 frame on attachments
[ffmpeg] / libavformat / utils.c
index 2936ed5576190f61bd96c088d61ed87de95ee099..5cff3a78e81f62fe287d07cf2c9075150b9963b4 100644 (file)
@@ -3313,7 +3313,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                 break;
             if (st->first_dts == AV_NOPTS_VALUE &&
                 !(ic->iformat->flags & AVFMT_NOTIMESTAMPS) &&
-                st->codec_info_nb_frames < ic->max_ts_probe &&
+                st->codec_info_nb_frames < ((st->disposition & AV_DISPOSITION_ATTACHED_PIC) ? 1 : ic->max_ts_probe) &&
                 (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
                  st->codec->codec_type == AVMEDIA_TYPE_AUDIO))
                 break;