From 54f5c42d7b0e8b9778f9a6423a8cfe174ae06d08 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 31 Jan 2021 18:56:50 +0100 Subject: [PATCH] Add mutex assertions --- app/src/video_buffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/video_buffer.c b/app/src/video_buffer.c index 660c6929..95cfd755 100644 --- a/app/src/video_buffer.c +++ b/app/src/video_buffer.c @@ -64,6 +64,7 @@ video_buffer_destroy(struct video_buffer *vb) { static void video_buffer_swap_frames(struct video_buffer *vb) { + sc_mutex_assert(&vb->mutex); AVFrame *tmp = vb->decoding_frame; vb->decoding_frame = vb->rendering_frame; vb->rendering_frame = tmp; @@ -92,6 +93,7 @@ video_buffer_offer_decoded_frame(struct video_buffer *vb, const AVFrame * video_buffer_consume_rendered_frame(struct video_buffer *vb) { + sc_mutex_assert(&vb->mutex); assert(!vb->rendering_frame_consumed); vb->rendering_frame_consumed = true; fps_counter_add_rendered_frame(vb->fps_counter);