[FFmpeg-cvslog] avfilter/select: initialize prev_selected_n to NAN

Gyan Doshi git at videolan.org
Sun Dec 10 06:00:30 EET 2023


ffmpeg | branch: master | Gyan Doshi <ffmpeg at gyani.pro> | Fri Dec  8 13:19:04 2023 +0530| [b9fd3e7a88b326f719bd3c47d0e0cc5a435de428] | committer: Gyan Doshi

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.

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

 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;



More information about the ffmpeg-cvslog mailing list