diff --git a/doc/filters.texi b/doc/filters.texi index 2818bd28b0..e84d7d5554 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -31911,9 +31911,9 @@ This filter accepts the following options: The expression which is evaluated for each frame to construct its timestamp. @item strip_fps (@emph{video only}) -Boolean option which determines if the original framerate metadata is unset. -If set to true, be advised that a sane frame rate should be explicitly -specified if output is sent to a constant frame rate muxer. +Boolean option which determines if the original framerate and frame duration +metadata is unset. If set to true, be advised that a sane frame rate should be +explicitly specified if output is sent to a constant frame rate muxer. Default is @code{false}. @end table diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index 0565533ed2..b49a0cb64f 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -199,7 +199,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) d = eval_pts(setpts, inlink, frame, frame->pts); frame->pts = D2TS(d); - frame->duration = 0; + if (setpts->strip_fps) + frame->duration = 0; av_log(inlink->dst, AV_LOG_TRACE, "N:%"PRId64" PTS:%s T:%f",