This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit a17a6240695078537fb850fe713b4db1c87b09a3 Author: Kacper Michajłow <[email protected]> AuthorDate: Wed Sep 30 00:10:42 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Wed Sep 30 14:40:12 2026 +0000 swresample: skip the rematrix stage when there are no samples When resampling first, a call that produced no output passed midbuf to swri_rematrix() before it was ever allocated, and copied channels did a memcpy() of zero bytes from NULL. Skip rematrixing zero samples, as the output conversion already does. Signed-off-by: Kacper Michajłow <[email protected]> --- libswresample/swresample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index cd84c731d9..52ad73836e 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -680,10 +680,10 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co if(postin != midbuf) if ((out_count = resample(s, midbuf, out_count, postin, in_count)) < 0) return out_count; - if(midbuf != preout) + if(midbuf != preout && out_count) swri_rematrix(s, preout, midbuf, out_count, preout==out); }else{ - if(postin != midbuf) + if(postin != midbuf && in_count) swri_rematrix(s, midbuf, postin, in_count, midbuf==out); if(midbuf != preout) if ((out_count = resample(s, preout, out_count, midbuf, in_count)) < 0) -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
