MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_network_sleep_interruptible

Function ff_network_sleep_interruptible

libavformat/network.c:95–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95int ff_network_sleep_interruptible(int64_t timeout, AVIOInterruptCB *int_cb)
96{
97 int64_t wait_start = av_gettime_relative();
98
99 while (1) {
100 int64_t time_left;
101
102 if (ff_check_interrupt(int_cb))
103 return AVERROR_EXIT;
104
105 time_left = timeout - (av_gettime_relative() - wait_start);
106 if (time_left <= 0)
107 return AVERROR(ETIMEDOUT);
108
109 av_usleep(FFMIN(time_left, POLLING_TIME * 1000));
110 }
111}
112
113void ff_network_close(void)
114{

Callers 2

http_open_cnxFunction · 0.85
http_read_streamFunction · 0.85

Calls 3

av_gettime_relativeFunction · 0.85
ff_check_interruptFunction · 0.85
av_usleepFunction · 0.85

Tested by

no test coverage detected