On Fri, May 24, 2024 at 08:21:05AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: CID1473512 Unused value > > Fixes: CID1529228 Unused value > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > 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; > > } > > } > > > > IIRC these stores are only dead since > ac5a568e6dff8162a2e982f3571b925f1b207e2c; and it doesn't seem as if this > was intended. replaced by: @@ -3027,9 +3027,11 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } } - ret = compute_chapters_end(ic); - if (ret < 0) + err = compute_chapters_end(ic); + if (err < 0) { + ret = err; goto find_stream_info_err; + } /* update the stream parameters from the internal codec contexts */ for (unsigned i = 0; i < ic->nb_streams; i++) { [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin