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

zhongli_dev at 126.com zhongli_dev at 126.com
Sat Oct 26 17:18:32 EEST 2019


From: Zhong Li <zhongli_dev at 126.com>

Signed-off-by: Zhong Li <zhongli_dev at 126.com>
---
 tools/probetest.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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) {
-- 
2.17.1



More information about the ffmpeg-devel mailing list