avformat/demux: Remove fake-loop

When flushing, try_decode_frame() itself loops until the desired
properties have been found or the decoder is drained.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-12-09 17:14:50 +01:00
parent aba4a4f080
commit 52a4d44044

View File

@ -2771,11 +2771,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
/* flush the decoders */
if (sti->info->found_decoder == 1) {
do {
err = try_decode_frame(ic, st, empty_pkt,
(options && i < orig_nb_streams)
? &options[i] : NULL);
} while (err > 0 && !has_codec_parameters(st, NULL));
err = try_decode_frame(ic, st, empty_pkt,
(options && i < orig_nb_streams)
? &options[i] : NULL);
if (err < 0) {
av_log(ic, AV_LOG_INFO,