summaryrefslogtreecommitdiff
path: root/libavfilter/af_atempo.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2014-03-05 17:59:38 +0100
committerNicolas George <george@nsup.org>2014-03-08 12:31:00 +0100
commitbc6901c94944e4a81be49a6b11183cd0c55d2738 (patch)
tree4396fb232eca7a50fe6ecdd649b855bc7aad0344 /libavfilter/af_atempo.c
parentc37bbe54f400edc8cb0070138328048943e90b1a (diff)
lavfi/af_atempo: clear references before returning error.
Once the frame has been given to ff_filter_frame(), it can no longer be used, even on error. Fix trac ticket #3430.
Diffstat (limited to 'libavfilter/af_atempo.c')
-rw-r--r--libavfilter/af_atempo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index c474d6a58c..6a3fd61e60 100644
--- a/libavfilter/af_atempo.c
+++ b/libavfilter/af_atempo.c
@@ -1058,11 +1058,11 @@ static int push_samples(ATempoContext *atempo,
outlink->time_base);
ret = ff_filter_frame(outlink, atempo->dst_buffer);
- if (ret < 0)
- return ret;
atempo->dst_buffer = NULL;
atempo->dst = NULL;
atempo->dst_end = NULL;
+ if (ret < 0)
+ return ret;
atempo->nsamples_out += n_out;
return 0;