diff --git a/libavformat/demux.c b/libavformat/demux.c index e121253dfd..57720f4311 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -2615,10 +2615,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) /* NOTE: A new stream can be added there if no header in file * (AVFMTCTX_NOHEADER). */ ret = read_frame_internal(ic, pkt1); - if (ret == AVERROR(EAGAIN)) { - read_size += 100; + if (ret == AVERROR(EAGAIN)) continue; - } if (ret < 0) { /* EOF or error*/