Commit d6a1f711 authored by Marton Balint's avatar Marton Balint

avfilter/af_asetnsamples: do not leak frame on ENOMEM

Fixes Coverity CID 1416352.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 6e6ecdf4
......@@ -71,8 +71,10 @@ static int activate(AVFilterContext *ctx)
return ff_filter_frame(outlink, frame);
pad_frame = ff_get_audio_buffer(outlink, s->nb_out_samples);
if (!pad_frame)
if (!pad_frame) {
av_frame_free(&frame);
return AVERROR(ENOMEM);
}
av_samples_copy(pad_frame->extended_data, frame->extended_data,
0, 0, frame->nb_samples, frame->channels, frame->format);
......
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