[FFmpeg-cvslog] lavfi/af_atempo: clear references before returning error.

Nicolas George git at videolan.org
Sat Mar 8 15:19:47 CET 2014


ffmpeg | branch: release/2.2 | Nicolas George <george at nsup.org> | Wed Mar  5 17:59:38 2014 +0100| [7d995cd1b8e2c73edf9886182722359c0027bf62] | committer: Carl Eugen Hoyos

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.
(cherry picked from commit bc6901c94944e4a81be49a6b11183cd0c55d2738)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d995cd1b8e2c73edf9886182722359c0027bf62
---

 libavfilter/af_atempo.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index c474d6a..6a3fd61 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;



More information about the ffmpeg-cvslog mailing list