Skip to content

Commit

Permalink
vdisp/ndi: safe syncs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Oct 14, 2024
1 parent b840e0a commit 3e52ae4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/video_display/ndi.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ static void display_ndi_done(void *state)
{
struct display_ndi *s = (struct display_ndi *) state;

// wait for the async frame to be processed
s->NDIlib->send_send_video_async_v2(s->pNDI_send, NULL);

s->NDIlib->send_destroy(s->pNDI_send);
free(s->convert_buffer);
s->NDIlib->destroy();
Expand Down Expand Up @@ -335,7 +338,8 @@ static bool display_ndi_putf(void *state, struct video_frame *frame, long long f
return true;
}

s->NDIlib->send_send_video_v2(s->pNDI_send, NULL); // wait for the async frame to be processed
// wait for the async frame to be processed
s->NDIlib->send_send_video_async_v2(s->pNDI_send, NULL);
vf_free(s->send_frame);
s->send_frame = NULL;

Expand Down

0 comments on commit 3e52ae4

Please sign in to comment.