fftools/ffmpeg_sched: actually initialize/destroy schedule_lock
This commit is contained in:
@@ -565,6 +565,8 @@ void sch_free(Scheduler **psch)
|
|||||||
|
|
||||||
av_freep(&sch->sdp_filename);
|
av_freep(&sch->sdp_filename);
|
||||||
|
|
||||||
|
pthread_mutex_destroy(&sch->schedule_lock);
|
||||||
|
|
||||||
pthread_mutex_destroy(&sch->mux_ready_lock);
|
pthread_mutex_destroy(&sch->mux_ready_lock);
|
||||||
|
|
||||||
pthread_mutex_destroy(&sch->mux_done_lock);
|
pthread_mutex_destroy(&sch->mux_done_lock);
|
||||||
@@ -590,6 +592,10 @@ Scheduler *sch_alloc(void)
|
|||||||
sch->class = &scheduler_class;
|
sch->class = &scheduler_class;
|
||||||
sch->sdp_auto = 1;
|
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);
|
ret = pthread_mutex_init(&sch->mux_ready_lock, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
Reference in New Issue
Block a user