From: Hou Lei <hou...@uniontech.com> Signed-off-by: Hou Lei <hou...@uniontech.com> --- libavdevice/xcbgrab.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index be5d5ea2cf..7e886064fe 100644 --- a/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c @@ -208,7 +208,16 @@ static int64_t wait_frame(AVFormatContext *s, AVPacket *pkt) for (;;) { curtime = av_gettime(); delay = c->time_frame - curtime; - if (delay <= 0) + + //When the user changes the operating system time, can synchronization be forced here? + /* + if (delay > 10) { + c->time_frame = curtime + c->frame_duration; + break; + } + */ + //When the user changes the operating system time, add timeout judgment. + if (delay <= 0 || delay > 10) break; av_usleep(delay); } -- 2.20.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".