Commit 8501c098 authored by Janne Grunau's avatar Janne Grunau
Browse files

af_amix: prevent memory leak on error path

Fixes CID732272.
parent 6f8ef532
......@@ -285,8 +285,10 @@ static int output_frame(AVFilterLink *outlink, int nb_samples)
return AVERROR(ENOMEM);
in_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
if (!in_buf)
if (!in_buf) {
avfilter_unref_buffer(out_buf);
return AVERROR(ENOMEM);
}
for (i = 0; i < s->nb_inputs; i++) {
if (s->input_state[i] == INPUT_ON) {
......
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