avfilter/af_flanger: free frame on ENOMEM

Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Kyle Swanson 2015-10-15 10:08:36 -05:00 committed by Michael Niedermayer
parent 07d4fe3a87
commit 32403d1fab
1 changed files with 3 additions and 1 deletions

View File

@ -149,8 +149,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
out_frame = frame;
} else {
out_frame = ff_get_audio_buffer(inlink, frame->nb_samples);
if (!out_frame)
if (!out_frame) {
av_frame_free(&frame);
return AVERROR(ENOMEM);
}
av_frame_copy_props(out_frame, frame);
}