Le tridi 13 fructidor, an CCXXII, Carl Eugen Hoyos a écrit : > Attached patch fixes a memleak with ffmpeg if the filter initialisation > fails, > fixes ticket #3858 for me. > > Please review, Carl Eugen
> diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
> index b6dc42f..7acff28 100644
> --- a/ffmpeg_filter.c
> +++ b/ffmpeg_filter.c
> @@ -898,8 +898,11 @@ int configure_filtergraph(FilterGraph *fg)
> init_input_filter(fg, cur);
>
> for (cur = inputs, i = 0; cur; cur = cur->next, i++)
> - if ((ret = configure_input_filter(fg, fg->inputs[i], cur)) < 0)
> + if ((ret = configure_input_filter(fg, fg->inputs[i], cur)) < 0) {
> + avfilter_inout_free(&inputs);
> + avfilter_inout_free(&outputs);
> return ret;
> + }
> avfilter_inout_free(&inputs);
>
> if (!init || simple) {
Looks right.
Please mention in the commit short message that it is about the command-line
tools and not the library; maybe "ffmpeg: clean up if...".
Regards,
--
Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
