diff mbox

[FFmpeg-devel,1/2] tools/probetest: replace the deprecated API

Message ID 20191102154701.809-1-zhongli_dev@126.com
State Accepted
Commit f52e15df0f6a91428220d7a0852f0d020c2e75a2
Headers show

Commit Message

Zhong Li Nov. 2, 2019, 3:47 p.m. UTC
From: Zhong Li <zhongli_dev@126.com>

Signed-off-by: Zhong Li <zhongli_dev@126.com>
---
 tools/probetest.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/tools/probetest.c b/tools/probetest.c
index 2c6c1de246..cfa309cabd 100644
--- a/tools/probetest.c
+++ b/tools/probetest.c
@@ -38,9 +38,10 @@  static const char *single_format;
 static void probe(AVProbeData *pd, int type, int p, int size)
 {
     int i = 0;
-    AVInputFormat *fmt = NULL;
+    const 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) {