[FFmpeg-cvslog] avformat/demux: Remove fake-loop

Andreas Rheinhardt git at videolan.org
Thu Dec 16 04:01:45 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Dec  9 17:14:50 2021 +0100| [52a4d4404409af79ae0f5ed32d78386d43b19c84] | committer: Andreas Rheinhardt

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 at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52a4d4404409af79ae0f5ed32d78386d43b19c84
---

 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,



More information about the ffmpeg-cvslog mailing list