]> git.sesse.net Git - ffmpeg/commitdiff
lavf/img2dec: use new iteration API
authorJosh de Kock <josh@itanimul.li>
Sun, 18 Mar 2018 15:31:20 +0000 (15:31 +0000)
committerJosh de Kock <josh@itanimul.li>
Mon, 2 Apr 2018 02:26:22 +0000 (03:26 +0100)
Signed-off-by: Josh de Kock <josh@itanimul.li>
libavformat/img2dec.c

index f3f52c83b355ad00f9cc2f49f67f2e47337d143a..ffbc9a66d823102c898857cfa7af325b51b04307 100644 (file)
@@ -323,7 +323,8 @@ int ff_img_read_header(AVFormatContext *s1)
         if (s1->pb) {
             int probe_buffer_size = 2048;
             uint8_t *probe_buffer = av_realloc(NULL, probe_buffer_size + AVPROBE_PADDING_SIZE);
-            AVInputFormat *fmt = NULL;
+            const AVInputFormat *fmt = NULL;
+            void *fmt_iter = 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(&fmt_iter))) {
                 if (fmt->read_header != ff_img_read_header ||
                     !fmt->read_probe ||
                     (fmt->flags & AVFMT_NOFILE) ||