[FFmpeg-devel] [PATCH 1/3] avformat: Correctly check the list before accessing

Zhao, Gang gang.zhao.42 at gmail.com
Sat May 9 11:50:47 EEST 2020


Signed-off-by: Zhao, Gang <gang.zhao.42 at gmail.com>
---
 libavformat/allformats.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git libavformat/allformats.c libavformat/allformats.c
index 3919c9e4c1..47cf885699 100644
--- libavformat/allformats.c
+++ libavformat/allformats.c
@@ -520,7 +520,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
 
     if (i < size) {
         f = muxer_list[i];
-    } else if (indev_list) {
+    } else if (outdev_list) {
         f = outdev_list[i - size];
     }
 
@@ -537,7 +537,7 @@ const AVInputFormat *av_demuxer_iterate(void **opaque)
 
     if (i < size) {
         f = demuxer_list[i];
-    } else if (outdev_list) {
+    } else if (indev_list) {
         f = indev_list[i - size];
     }
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list