Add mutex assertions
@@ -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);
