diff options
Diffstat (limited to 'libavfilter/f_select.c')
-rw-r--r-- | libavfilter/f_select.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 0421349..b0df507 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -283,6 +283,7 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame) if (isnan(select->var_values[VAR_START_T])) select->var_values[VAR_START_T] = TS2D(frame->pts) * av_q2d(inlink->time_base); + select->var_values[VAR_N ] = inlink->frame_count; select->var_values[VAR_PTS] = TS2D(frame->pts); select->var_values[VAR_T ] = TS2D(frame->pts) * av_q2d(inlink->time_base); select->var_values[VAR_POS] = av_frame_get_pkt_pos(frame) == -1 ? NAN : av_frame_get_pkt_pos(frame); @@ -352,7 +353,6 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame) select->var_values[VAR_CONSUMED_SAMPLES_N] += frame->nb_samples; } - select->var_values[VAR_N] += 1.0; select->var_values[VAR_PREV_PTS] = select->var_values[VAR_PTS]; select->var_values[VAR_PREV_T] = select->var_values[VAR_T]; } |