From: Hou Lei <[email protected]>
Signed-off-by: Hou Lei <[email protected]>
---
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
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".