aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/demux.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-09 17:14:50 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-16 02:37:25 +0100
commit52a4d4404409af79ae0f5ed32d78386d43b19c84 (patch)
tree8d1a92ed0ef88cad4f4c3cb6d0eb6074c7cb7939 /libavformat/demux.c
parentaba4a4f080b2c0aa96409f93f455f9870fabbe2d (diff)
downloadffmpeg-52a4d4404409af79ae0f5ed32d78386d43b19c84.tar.gz
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>
Diffstat (limited to 'libavformat/demux.c')
-rw-r--r--libavformat/demux.c8
1 files 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,