summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-09-12 20:26:44 +0200
committerPaul B Mahol <onemda@gmail.com>2017-09-12 20:28:53 +0200
commit04b9010f7f546dbe82e301fcb7fd3ea157d49155 (patch)
tree4ef1fa8d980751e6a29cc38778f5e691708f8063
parentde03eb622d30f7e23e0b9c76e581ad8fd788dfb3 (diff)
downloadffmpeg-streaming-04b9010f7f546dbe82e301fcb7fd3ea157d49155.zip
ffmpeg-streaming-04b9010f7f546dbe82e301fcb7fd3ea157d49155.tar.gz
avfilter/af_dcshift: do not leak out frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/af_dcshift.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c
index 2ca2d07..6d33dae 100644
--- a/libavfilter/af_dcshift.c
+++ b/libavfilter/af_dcshift.c
@@ -85,7 +85,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
- AVFrame *out = ff_get_audio_buffer(inlink, in->nb_samples);
+ AVFrame *out;
DCShiftContext *s = ctx->priv;
int i, j;
double dcshift = s->dcshift;
@@ -93,7 +93,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
- out = ff_get_audio_buffer(inlink, in->nb_samples);
+ out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);
OpenPOWER on IntegriCloud