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:
authorMichael Niedermayer <michael@niedermayer.cc>2016-05-29 22:21:59 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-05-29 22:21:59 +0300
commit645f7c1ce547f247af56990e6306d08d3d6a6286 (patch)
tree6345cd3f53c84ae86661c083017b9ec5f533fddf /libavfilter/f_loop.c
parentbe96ebdcd795c0d5acd229251eea97f3c4bf6095 (diff)
avfilter/f_loop: Fix leak on error
Fixes CID1355117 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/f_loop.c')
-rw-r--r--libavfilter/f_loop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c
index d8eb692e77..00e02154e8 100644
--- a/libavfilter/f_loop.c
+++ b/libavfilter/f_loop.c
@@ -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;