Message ID | 20231208073543.1907-1-ffmpeg@gyani.pro |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avfilter/select: initialize prev_selected_n to NAN | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On date Friday 2023-12-08 13:05:43 +0530, Gyan Doshi wrote: > 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..109dae403a 100644 > --- a/libavfilter/f_select.c > +++ b/libavfilter/f_select.c > @@ -230,6 +230,7 @@ static int config_input(AVFilterLink *inlink) > > select->var_values[VAR_N] = 0.0; > select->var_values[VAR_SELECTED_N] = 0.0; > + select->var_values[VAR_PREV_SELECTED_N] = NAN; Should be good but move it closer to the other VAR_PREV_* definitions.
On 2023-12-10 06:03 am, Stefano Sabatini wrote: > On date Friday 2023-12-08 13:05:43 +0530, Gyan Doshi wrote: >> 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..109dae403a 100644 >> --- a/libavfilter/f_select.c >> +++ b/libavfilter/f_select.c >> @@ -230,6 +230,7 @@ static int config_input(AVFilterLink *inlink) >> >> select->var_values[VAR_N] = 0.0; >> select->var_values[VAR_SELECTED_N] = 0.0; >> + select->var_values[VAR_PREV_SELECTED_N] = NAN; > Should be good but move it closer to the other VAR_PREV_* definitions. Done and pushed as b9fd3e7a88b326f719bd3c47d0e0cc5a435de428 Regards, Gyan
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 47e36f0014..109dae403a 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -230,6 +230,7 @@ static int config_input(AVFilterLink *inlink) select->var_values[VAR_N] = 0.0; select->var_values[VAR_SELECTED_N] = 0.0; + select->var_values[VAR_PREV_SELECTED_N] = NAN; select->var_values[VAR_TB] = av_q2d(inlink->time_base);