[FFmpeg-devel] [PATCH] fftools/ffmpeg_sched: actually initialize/destroy schedule_lock

Anton Khirnov anton at khirnov.net
Thu Dec 14 11:17:48 EET 2023


---
 fftools/ffmpeg_sched.c | 6 ++++++
 1 file changed, 6 insertions(+)

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;
-- 
2.42.0



More information about the ffmpeg-devel mailing list