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:
authorPavel Koshevoy <pkoshevoy@gmail.com>2013-04-21 07:33:55 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-04-21 12:45:57 +0400
commit5a2a0603780a6a5bb6d254e60eeb525378955b59 (patch)
tree7fafc4e091f059dcd577c7adc635ade1e1aba264 /libavfilter/af_atempo.c
parent2d234930209a3d686e0a7116f4a80c756f2a372e (diff)
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@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/af_atempo.c')
-rw-r--r--libavfilter/af_atempo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
index 3e2bc06dd9..4d1c68aa7e 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;
}