[FFmpeg-cvslog] ffmpeg: reset the dict iterator before use

Anton Khirnov git at videolan.org
Sun Aug 29 19:50:00 EEST 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Aug  8 13:02:13 2021 +0200| [4a0d918c9ef08ac4e0118d537ba561f90dfb960f] | committer: Anton Khirnov

ffmpeg: reset the dict iterator before use

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a0d918c9ef08ac4e0118d537ba561f90dfb960f
---

 fftools/ffmpeg_filter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index b3f230e8b6..64d2772f5d 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -971,6 +971,7 @@ int configure_filtergraph(FilterGraph *fg)
         fg->graph->nb_threads = filter_nbthreads;
 
         args[0] = 0;
+        e       = NULL;
         while ((e = av_dict_get(ost->sws_dict, "", e,
                                 AV_DICT_IGNORE_SUFFIX))) {
             av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
@@ -985,6 +986,7 @@ int configure_filtergraph(FilterGraph *fg)
         }
 
         args[0] = 0;
+        e       = NULL;
         while ((e = av_dict_get(ost->swr_opts, "", e,
                                 AV_DICT_IGNORE_SUFFIX))) {
             av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
@@ -994,6 +996,7 @@ int configure_filtergraph(FilterGraph *fg)
         av_opt_set(fg->graph, "aresample_swr_opts", args, 0);
 
         args[0] = '\0';
+        e       = NULL;
         while ((e = av_dict_get(fg->outputs[0]->ost->resample_opts, "", e,
                                 AV_DICT_IGNORE_SUFFIX))) {
             av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);



More information about the ffmpeg-cvslog mailing list