瀏覽代碼

avfilter/framesync: don't attempt to rescale AV_NOPTS_VALUE

Part of a fix for issue #20589.

Signed-off-by: James Almer <jamrial@gmail.com>
James Almer 1 月之前
父節點
當前提交
5614672d1b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libavfilter/framesync.c

+ 1 - 1
libavfilter/framesync.c

@@ -248,7 +248,7 @@ static void framesync_inject_frame(FFFrameSync *fs, unsigned in, AVFrame *frame)
 
     av_assert0(!fs->in[in].have_next);
     av_assert0(frame);
-    pts = av_rescale_q(frame->pts, fs->in[in].time_base, fs->time_base);
+    pts = av_rescale_q_rnd(frame->pts, fs->in[in].time_base, fs->time_base, AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
     frame->pts = pts;
     fs->in[in].frame_next = frame;
     fs->in[in].pts_next   = pts;