[FFmpeg-cvslog] libavfilter/af_atempo: Fix uninitialized memory access
Pavel Koshevoy
git at videolan.org
Sun Apr 21 11:19:41 CEST 2013
ffmpeg | branch: master | Pavel Koshevoy <pkoshevoy at gmail.com> | Sat Apr 20 21:33:55 2013 -0600| [5a2a0603780a6a5bb6d254e60eeb525378955b59] | committer: Michael Niedermayer
libavfilter/af_atempo: Fix uninitialized memory access
valgrind reported uninitialized memory access which was caused by
incorrect number of samples being passed to push_samples(..)
Signed-off-by: Pavel Koshevoy <pkoshevoy at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a2a0603780a6a5bb6d254e60eeb525378955b59
---
libavfilter/af_atempo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index 3e2bc06..4d1c68a 100644
--- a/libavfilter/af_atempo.c
+++ b/libavfilter/af_atempo.c
@@ -1082,7 +1082,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
yae_apply(atempo, &src, src_end, &atempo->dst, atempo->dst_end);
if (atempo->dst == atempo->dst_end) {
- ret = push_samples(atempo, outlink, n_out);
+ int n_samples = ((atempo->dst - atempo->dst_buffer->data[0]) /
+ atempo->stride);
+ ret = push_samples(atempo, outlink, n_samples);
if (ret < 0)
goto end;
}
More information about the ffmpeg-cvslog
mailing list