static void park_frame_worker_threads(FrameThreadContext *fctx, int thread_count)

{

    int i;



    for (i = 0; i < thread_count; i++) {

        PerThreadContext *p = &fctx->threads[i];



        if (p->state != STATE_INPUT_READY) {

            pthread_mutex_lock(&p->progress_mutex);

            while (p->state != STATE_INPUT_READY)

                pthread_cond_wait(&p->output_cond, &p->progress_mutex);

            pthread_mutex_unlock(&p->progress_mutex);

        }


    }

}
static void park_frame_worker_threads(FrameThreadContext *fctx, int thread_count)

{

    int i;



    for (i = 0; i < thread_count; i++) {

        PerThreadContext *p = &fctx->threads[i];



        if (p->state != STATE_INPUT_READY) {

            pthread_mutex_lock(&p->progress_mutex);

            while (p->state != STATE_INPUT_READY)

                pthread_cond_wait(&p->output_cond, &p->progress_mutex);

            pthread_mutex_unlock(&p->progress_mutex);

        }


    }

}
static void FUNC_0(FrameThreadContext *VAR_0, int VAR_1)

{

    int VAR_2;



    for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) {

        PerThreadContext *p = &VAR_0->threads[VAR_2];



        if (p->state != STATE_INPUT_READY) {

            pthread_mutex_lock(&p->progress_mutex);

            while (p->state != STATE_INPUT_READY)

                pthread_cond_wait(&p->output_cond, &p->progress_mutex);

            pthread_mutex_unlock(&p->progress_mutex);

        }


    }

}
static void FUNC_0(FrameThreadContext *VAR_0, int VAR_1)
{ int VAR_2; for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) { PerThreadContext *p = &VAR_0->threads[VAR_2]; if (p->state != STATE_INPUT_READY) { pthread_mutex_lock(&p->progress_mutex); while (p->state != STATE_INPUT_READY)
pthread_cond_wait(&p->output_cond, &p->progress_mutex); pthread_mutex_unlock(&p->progress_mutex); } } }