Commit 5a2a0603 authored by Pavel Koshevoy's avatar Pavel Koshevoy Committed by 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: 's avatarPavel Koshevoy <pkoshevoy@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2d234930
...@@ -1082,7 +1082,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer) ...@@ -1082,7 +1082,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
yae_apply(atempo, &src, src_end, &atempo->dst, atempo->dst_end); yae_apply(atempo, &src, src_end, &atempo->dst, atempo->dst_end);
if (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) if (ret < 0)
goto end; goto end;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment