| 2697 | } |
| 2698 | |
| 2699 | static int task_stop(Scheduler *sch, SchTask *task) |
| 2700 | { |
| 2701 | int ret; |
| 2702 | void *thread_ret; |
| 2703 | |
| 2704 | if (!task->parent) |
| 2705 | return 0; |
| 2706 | |
| 2707 | if (!task->thread_running) |
| 2708 | return task_cleanup(sch, task->node); |
| 2709 | |
| 2710 | ret = pthread_join(task->thread, &thread_ret); |
| 2711 | av_assert0(ret == 0); |
| 2712 | |
| 2713 | task->thread_running = 0; |
| 2714 | |
| 2715 | return (intptr_t)thread_ret; |
| 2716 | } |
| 2717 | |
| 2718 | int sch_stop(Scheduler *sch, int64_t *finish_ts) |
| 2719 | { |
no test coverage detected