Add mutex assertions
This commit is contained in:
parent
21d206f360
commit
54f5c42d7b
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue