[FFmpeg-cvslog] avfilter/af_join: do not dereference possible null pointer

Paul B Mahol git at videolan.org
Thu Mar 31 01:47:10 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Mar 31 00:46:47 2022 +0200| [55e509b0944e52de2227452bca668c2d72fa0de1] | committer: Paul B Mahol

avfilter/af_join: do not dereference possible null pointer

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

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

diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 6f01c6f70a..dc075a8b27 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -586,7 +586,8 @@ static int activate(AVFilterContext *ctx)
         }
     }
 
-    nb_samples = s->input_frames[0]->nb_samples;
+    if (s->input_frames[0])
+        nb_samples = s->input_frames[0]->nb_samples;
 
     for (i = 1; i < ctx->nb_inputs && nb_samples > 0; i++) {
         if (s->input_frames[i])



More information about the ffmpeg-cvslog mailing list