[FFmpeg-cvslog] fftools/ffmpeg_sched: actually initialize/destroy schedule_lock
Anton Khirnov
git at videolan.org
Thu Dec 14 21:22:52 EET 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Dec 14 09:42:59 2023 +0100| [06d5dc11db257786dd18d13f39dd063ef8c1fa7d] | committer: Anton Khirnov
fftools/ffmpeg_sched: actually initialize/destroy schedule_lock
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06d5dc11db257786dd18d13f39dd063ef8c1fa7d
---
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;
More information about the ffmpeg-cvslog
mailing list