diff mbox

[FFmpeg-devel,v3,7/7] lavf/img2dec: use new iteration API

Message ID 20180319193541.2977-8-josh@itanimul.li
State Superseded
Headers show

Commit Message

Josh Dekker March 19, 2018, 7:35 p.m. UTC
---
 libavformat/img2dec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index f3f52c83b3..159617f046 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -324,6 +324,7 @@  int ff_img_read_header(AVFormatContext *s1)
             int probe_buffer_size = 2048;
             uint8_t *probe_buffer = av_realloc(NULL, probe_buffer_size + AVPROBE_PADDING_SIZE);
             AVInputFormat *fmt = NULL;
+            void *opaque = NULL;
             AVProbeData pd = { 0 };
 
             if (!probe_buffer)
@@ -340,7 +341,7 @@  int ff_img_read_header(AVFormatContext *s1)
             pd.buf_size = probe_buffer_size;
             pd.filename = s1->url;
 
-            while ((fmt = av_iformat_next(fmt))) {
+            while ((fmt = av_demuxer_iterate(&opaque))) {
                 if (fmt->read_header != ff_img_read_header ||
                     !fmt->read_probe ||
                     (fmt->flags & AVFMT_NOFILE) ||