diff --git a/VERSION b/VERSION index 94bf94f8..9acae70a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B2-rc2-23-g977d7b277d+1 \ No newline at end of file +B2-rc2-24-g1d6d640b6e+1 \ No newline at end of file diff --git a/obs/lg.c b/obs/lg.c index 7bed224a..0435f495 100644 --- a/obs/lg.c +++ b/obs/lg.c @@ -1,3 +1,5 @@ +#define _GNU_SOURCE //needed for pthread_setname_np + #include #include @@ -193,6 +195,7 @@ static void lgUpdate(void * data, obs_data_t * settings) this->state = STATE_STARTING; pthread_create(&this->frameThread, NULL, frameThread, this); + pthread_setname_np(this->frameThread, "LGFrameThread"); } static void lgVideoTick(void * data, float seconds) @@ -212,6 +215,17 @@ static void lgVideoTick(void * data, float seconds) return; } + if ((status = lgmpClientAdvanceToLast(this->frameQueue)) != LGMP_OK) + { + if (status != LGMP_ERR_QUEUE_EMPTY) + { + os_sem_post(this->frameSem); + printf("lgmpClientAdvanceToLast: %s\n", lgmpStatusString(status)); + return; + } + } + + if ((status = lgmpClientProcess(this->frameQueue, &msg)) != LGMP_OK) { if (status == LGMP_ERR_QUEUE_EMPTY)