Commit 645f7c1c authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/f_loop: Fix leak on error

Fixes CID1355117
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent be96ebdc
......@@ -88,8 +88,10 @@ static int push_samples(AVFilterContext *ctx, int nb_samples)
if (!out)
return AVERROR(ENOMEM);
ret = av_audio_fifo_peek_at(s->fifo, (void **)out->extended_data, out->nb_samples, s->current_sample);
if (ret < 0)
if (ret < 0) {
av_frame_free(&out);
return ret;
}
out->pts = s->pts;
out->nb_samples = ret;
s->pts += out->nb_samples;
......
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