diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-07-14 17:50:37 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-07-14 18:20:18 +0200 |
commit | 077bf9058f162414340b427dd467b7b8739874cd (patch) | |
tree | 34f9acf69b4b9daf73f3b7251572685ffa3c2a01 /libavfilter | |
parent | 8788dd67b851ec652bdd83bb5d5afb12101b7c6f (diff) | |
download | ffmpeg-077bf9058f162414340b427dd467b7b8739874cd.tar.gz |
avfilter/vf_displace: use time_base from framesync
Fixes non-monotonous timestamps.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_displace.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c index 768af6def4..e4c0330613 100644 --- a/libavfilter/vf_displace.c +++ b/libavfilter/vf_displace.c @@ -265,7 +265,7 @@ static int process_frame(FFFrameSync *fs) s->displace(s, in, xpic, ypic, out); } - out->pts = av_rescale_q(in->pts, s->fs.time_base, outlink->time_base); + out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base); return ff_filter_frame(outlink, out); } @@ -332,7 +332,6 @@ static int config_output(AVFilterLink *outlink) outlink->w = srclink->w; outlink->h = srclink->h; - outlink->time_base = srclink->time_base; outlink->sample_aspect_ratio = srclink->sample_aspect_ratio; outlink->frame_rate = srclink->frame_rate; @@ -356,7 +355,10 @@ static int config_output(AVFilterLink *outlink) s->fs.opaque = s; s->fs.on_event = process_frame; - return ff_framesync_configure(&s->fs); + ret = ff_framesync_configure(&s->fs); + outlink->time_base = s->fs.time_base; + + return ret; } static int activate(AVFilterContext *ctx) |