Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-06-24 19:36:46 +0300
committerPaul B Mahol <onemda@gmail.com>2017-06-24 20:15:57 +0300
commitc90b88090c260a0af018b6c1e955266e24ebf6f4 (patch)
tree74405107c4cb1234dfced7a2052a198ebb3a35c2 /libavfilter/af_atempo.c
parentdb9e87dd8c1ce11d37edc16f9380ee8dee68891b (diff)
avfilter: do not leak AVFrame on failed buffer allocation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_atempo.c')
-rw-r--r--libavfilter/af_atempo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index d90910598c..76410221d6 100644
--- a/libavfilter/af_atempo.c
+++ b/libavfilter/af_atempo.c
@@ -1090,8 +1090,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
while (src < src_end) {
if (!atempo->dst_buffer) {
atempo->dst_buffer = ff_get_audio_buffer(outlink, n_out);
- if (!atempo->dst_buffer)
+ if (!atempo->dst_buffer) {
+ av_frame_free(&src_buffer);
return AVERROR(ENOMEM);
+ }
av_frame_copy_props(atempo->dst_buffer, src_buffer);
atempo->dst = atempo->dst_buffer->data[0];