[client] fix race with call to on_restart

This commit is contained in:
Geoffrey McRae 2020-10-14 19:40:20 +11:00
parent 757a90a643
commit 0684ff401f

View File

@ -524,6 +524,8 @@ static int frameThread(void * unused)
} }
lgmpClientUnsubscribe(&queue); lgmpClientUnsubscribe(&queue);
state.lgr->on_restart(state.lgrData);
return 0; return 0;
} }
@ -1155,9 +1157,7 @@ static void toggle_video(SDL_Scancode key, void * opaque)
state.stopVideo ? "Video Stream Disabled" : "Video Stream Enabled" state.stopVideo ? "Video Stream Disabled" : "Video Stream Enabled"
); );
if (state.stopVideo) if (!state.stopVideo)
state.lgr->on_restart(state.lgrData);
else
{ {
if (t_frame) if (t_frame)
{ {