Commit 494cbc42 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

ffmpeg: Clean up if filter initialisation failed to avoid a memleak.

Fixes ticket #3858.

Reviewed-by: Nicolas George
parent 19bf1ed1
...@@ -898,8 +898,11 @@ int configure_filtergraph(FilterGraph *fg) ...@@ -898,8 +898,11 @@ int configure_filtergraph(FilterGraph *fg)
init_input_filter(fg, cur); init_input_filter(fg, cur);
for (cur = inputs, i = 0; cur; cur = cur->next, i++) 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; return ret;
}
avfilter_inout_free(&inputs); avfilter_inout_free(&inputs);
if (!init || simple) { if (!init || simple) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment