[obs] fix potential deadlock

This commit is contained in:
Geoffrey McRae 2020-04-24 23:03:40 +10:00
parent 00a41be413
commit 8d5a42c233
2 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
B1-182-g041a6c3cf6+1 B1-184-g00a41be413+1

View File

@ -229,6 +229,7 @@ static void lgVideoTick(void * data, float seconds)
case FRAME_TYPE_RGBA10: format = GS_R10G10B10A2; break; case FRAME_TYPE_RGBA10: format = GS_R10G10B10A2; break;
default: default:
printf("invalid type %d\n", this->type); printf("invalid type %d\n", this->type);
os_sem_post(this->frameSem);
obs_leave_graphics(); obs_leave_graphics();
return; return;
} }
@ -239,6 +240,7 @@ static void lgVideoTick(void * data, float seconds)
if (!this->texture) if (!this->texture)
{ {
printf("create texture failed\n"); printf("create texture failed\n");
os_sem_post(this->frameSem);
obs_leave_graphics(); obs_leave_graphics();
return; return;
} }