mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
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>
This commit is contained in:
parent
2d23493020
commit
5a2a060378
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user