From b9fd3e7a88b326f719bd3c47d0e0cc5a435de428 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Fri, 8 Dec 2023 13:01:04 +0530 Subject: [PATCH] avfilter/select: initialize prev_selected_n to NAN As per the doc, prev_selected_n should be NAN at the start. However, this was never set. --- libavfilter/f_select.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 47e36f0014..9b330a0673 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -233,6 +233,7 @@ static int config_input(AVFilterLink *inlink) select->var_values[VAR_TB] = av_q2d(inlink->time_base); + select->var_values[VAR_PREV_SELECTED_N] = NAN; select->var_values[VAR_PREV_PTS] = NAN; select->var_values[VAR_PREV_SELECTED_PTS] = NAN; select->var_values[VAR_PREV_SELECTED_T] = NAN;