[FFmpeg-devel] [PATCH] avformat/demux: Remove dead stores

Michael Niedermayer michael at niedermayer.cc
Fri May 24 03:25:23 EEST 2024


Fixes: CID1473512 Unused value
Fixes: CID1529228 Unused value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/demux.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavformat/demux.c b/libavformat/demux.c
index ecefe7e0a74..d0a5a39d052 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2998,9 +2998,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
 
     av_opt_set_int(ic, "skip_clear", 0, AV_OPT_SEARCH_CHILDREN);
 
-    if (ret >= 0 && ic->nb_streams)
-        /* We could not have all the codec parameters before EOF. */
-        ret = -1;
     for (unsigned i = 0; i < ic->nb_streams; i++) {
         AVStream *const st  = ic->streams[i];
         FFStream *const sti = ffstream(st);
@@ -3022,8 +3019,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                    "Could not find codec parameters for stream %d (%s): %s\n"
                    "Consider increasing the value for the 'analyzeduration' (%"PRId64") and 'probesize' (%"PRId64") options\n",
                    i, buf, errmsg, ic->max_analyze_duration, ic->probesize);
-        } else {
-            ret = 0;
         }
     }
 
-- 
2.45.1



More information about the ffmpeg-devel mailing list