[FFmpeg-cvslog] avfilter/af_surround: check that upmix func ptr is valid

Paul B Mahol git at videolan.org
Mon Nov 14 23:16:47 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Nov 14 22:19:34 2022 +0100| [9bbd3b3b17487a37a4c9669e17ec3ac5968da978] | committer: Paul B Mahol

avfilter/af_surround: check that upmix func ptr is valid

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bbd3b3b17487a37a4c9669e17ec3ac5968da978
---

 libavfilter/af_surround.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c
index c5be5f456f..d94c01ad9d 100644
--- a/libavfilter/af_surround.c
+++ b/libavfilter/af_surround.c
@@ -1949,7 +1949,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
                             ff_filter_get_nb_threads(ctx)));
 
     s->filter(ctx);
-    ff_filter_execute(ctx, s->upmix, NULL, NULL, outlink->ch_layout.nb_channels);
+    if (s->upmix)
+        ff_filter_execute(ctx, s->upmix, NULL, NULL, outlink->ch_layout.nb_channels);
 
     out = ff_get_audio_buffer(outlink, s->hop_size);
     if (!out)



More information about the ffmpeg-cvslog mailing list