| 347 | } |
| 348 | |
| 349 | static int waiter_init(SchWaiter *w) |
| 350 | { |
| 351 | int ret; |
| 352 | |
| 353 | atomic_init(&w->choked, 0); |
| 354 | |
| 355 | ret = pthread_mutex_init(&w->lock, NULL); |
| 356 | if (ret) |
| 357 | return AVERROR(ret); |
| 358 | |
| 359 | ret = pthread_cond_init(&w->cond, NULL); |
| 360 | if (ret) |
| 361 | return AVERROR(ret); |
| 362 | |
| 363 | return 0; |
| 364 | } |
| 365 | |
| 366 | static void waiter_uninit(SchWaiter *w) |
| 367 | { |
no test coverage detected