X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_decimate.c;h=1fb242a3ae542ca4d20c4a02b16a0dcad692d8a1;hb=c619a4e5259b6304475d889d0eae8ff661d518a7;hp=39c333142597d6f2f684439f4aeb126e465dd733;hpb=da76175d681246b07d526a395552edc020f0f4d9;p=ffmpeg diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index 39c33314259..1fb242a3ae5 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -223,7 +223,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) av_frame_free(&frame); frame = dm->clean_src[i]; } - frame->pts = av_rescale_q(outlink->frame_count, dm->ts_unit, (AVRational){1,1}) + + frame->pts = av_rescale_q(outlink->frame_count_in, dm->ts_unit, (AVRational){1,1}) + (dm->start_pts == AV_NOPTS_VALUE ? 0 : dm->start_pts); ret = ff_filter_frame(outlink, frame); if (ret < 0)