Message ID | 20191026141832.6465-2-zhongli_dev@126.com |
---|---|
State | New |
Headers | show |
On Sat, Oct 26, 2019 at 22:18:32 +0800, zhongli_dev@126.com wrote: > AVInputFormat *fmt = NULL; > + void *fmt_opaque = NULL; > > - while ((fmt = av_iformat_next(fmt))) { > + while ((fmt = av_demuxer_iterate(&fmt_opaque))) { Doesn't this give you (new) warnings? fmt needs to be const now: const AVInputFormat *fmt = NULL; as far as I can tell. icc should give you: warning #2332: a value of type "const AVInputFormat *" cannot be assigned to an entity of type "AVInputFormat *" (dropping qualifiers) Cheers, Moritz
diff --git a/tools/probetest.c b/tools/probetest.c index 2c6c1de246..75ed42d480 100644 --- a/tools/probetest.c +++ b/tools/probetest.c @@ -39,8 +39,9 @@ static void probe(AVProbeData *pd, int type, int p, int size) { int i = 0; AVInputFormat *fmt = NULL; + void *fmt_opaque = NULL; - while ((fmt = av_iformat_next(fmt))) { + while ((fmt = av_demuxer_iterate(&fmt_opaque))) { if (fmt->flags & AVFMT_NOFILE) continue; if (fmt->read_probe && @@ -66,8 +67,9 @@ static void print_times(void) { int i = 0; AVInputFormat *fmt = NULL; + void *fmt_opaque = NULL; - while ((fmt = av_iformat_next(fmt))) { + while ((fmt = av_demuxer_iterate(&fmt_opaque))) { if (fmt->flags & AVFMT_NOFILE) continue; if (time_array[i] > 1000000) {