| 223 | } |
| 224 | |
| 225 | static int fillQueues( sync_common_t * common ) |
| 226 | { |
| 227 | int ii, wait = 0, abort = 0; |
| 228 | |
| 229 | for (ii = 0; ii < common->stream_count; ii++) |
| 230 | { |
| 231 | sync_stream_t *stream = &common->streams[ii]; |
| 232 | |
| 233 | // Don't let the queues grow indefinitely |
| 234 | // abort when too large |
| 235 | if (hb_list_count(stream->in_queue) > stream->max_len) |
| 236 | { |
| 237 | abort = 1; |
| 238 | } |
| 239 | if (hb_list_count(stream->in_queue) <= stream->min_len) |
| 240 | { |
| 241 | wait = 1; |
| 242 | } |
| 243 | } |
| 244 | return !wait || abort; |
| 245 | } |
| 246 | |
| 247 | static void scrSlip( sync_common_t * common, int64_t delta ) |
| 248 | { |
no test coverage detected