diff mbox series

[FFmpeg-devel,04/12] avformat/demux: Remove redundant prevention against infinite loop

Message ID AM7PR03MB6660288F306DC245E1BFF4B18F729@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 97e26937b46323fc85480d32123d5d4f1fcd7832
Headers show
Series [FFmpeg-devel,01/12] avcodec/h2645_parse: Remove H2645NAL.rbsp_buffer | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 11, 2021, 6:40 p.m. UTC
This piece of code has been added as FFmpeg's answer to
infinite loops in try_decode_frame() in commit
6072a19b4f311cb172d45e90daad90824e40e4b6. There is no loop
around try_decode_frame() any more, so this code can be removed.

This code is only triggered in case a) the codec parameter could
not be determined, b) the decode delay could not be guessed or
c) no packet was ever encountered and the encoder has the
AV_CODEC_CAP_CHANNEL_CONF. In these cases the new code will
no longer emit a "decoding for stream %d failed" message, which is
prima facie false. In case a) an additional "Could not find codec
parameters" message is (and will be) emitted. No warning will be
emitted any more in case b) (this happens e.g. with some
h264-conformance FATE-files).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavformat/demux.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series


diff --git a/libavformat/demux.c b/libavformat/demux.c
index 87dbd53a0f..3f35b3860e 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2054,9 +2054,6 @@  static int try_decode_frame(AVFormatContext *s, AVStream *st,
-    if (!pkt.data && !got_picture)
-        ret = -1;
     if (do_skip_frame) {
         avctx->skip_frame = skip_frame;