aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-12-14 09:42:59 +0100
committerAnton Khirnov <anton@khirnov.net>2023-12-14 10:16:39 +0100
commit06d5dc11db257786dd18d13f39dd063ef8c1fa7d (patch)
tree9b2df115e9b277d7131a9e4dee5e10e7f5916fed
parent5256b2fbe603c9e3f94070837f257b9ddc7a3da2 (diff)
downloadffmpeg-06d5dc11db257786dd18d13f39dd063ef8c1fa7d.tar.gz
fftools/ffmpeg_sched: actually initialize/destroy schedule_lock
-rw-r--r--fftools/ffmpeg_sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fftools/ffmpeg_sched.c b/fftools/ffmpeg_sched.c
index 96eaaae072..20063fe47e 100644
--- a/fftools/ffmpeg_sched.c
+++ b/fftools/ffmpeg_sched.c
@@ -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;