[FFmpeg-devel] [PATCH 01/10] ffmpeg: reset the dict iterator before use
James Almer
jamrial at gmail.com
Mon Aug 9 01:39:11 EEST 2021
On 8/8/2021 2:29 PM, Anton Khirnov wrote:
> ---
> fftools/ffmpeg_filter.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
> index 49076f13ee..b252ee4138 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,
This is the first use of e, so it's already NULL. Did you meant to reset
it for the fg->outputs[0]->ost->resample_opts loop several lines below?
> AV_DICT_IGNORE_SUFFIX))) {
> av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
> @@ -984,6 +985,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);
>
More information about the ffmpeg-devel
mailing list