fftools/ffmpeg_sched: actually initialize/destroy schedule_lock

This commit is contained in:
Anton Khirnov 2023-12-14 09:42:59 +01:00
parent 5256b2fbe6
commit 06d5dc11db
1 changed files with 6 additions and 0 deletions

View File

@ -565,6 +565,8 @@ void sch_free(Scheduler **psch)
av_freep(&sch->sdp_filename);
pthread_mutex_destroy(&sch->schedule_lock);
pthread_mutex_destroy(&sch->mux_ready_lock);
pthread_mutex_destroy(&sch->mux_done_lock);
@ -590,6 +592,10 @@ Scheduler *sch_alloc(void)
sch->class = &scheduler_class;
sch->sdp_auto = 1;
ret = pthread_mutex_init(&sch->schedule_lock, NULL);
if (ret)
goto fail;
ret = pthread_mutex_init(&sch->mux_ready_lock, NULL);
if (ret)
goto fail;