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.rheinha...@outlook.com> --- libavformat/demux.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index 745dc8687c..87dbd53a0f 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -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, -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".