From 55e509b0944e52de2227452bca668c2d72fa0de1 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 31 Mar 2022 00:46:47 +0200 Subject: [PATCH] avfilter/af_join: do not dereference possible null pointer --- 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])