-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
MEDIUMNot a risk, but definitely would improve functionalityNot a risk, but definitely would improve functionality
Description
Medium: Scene Cache Can Become Stale
Priority: MEDIUM
Type: Logic Issue
Location
libwsv5.c line 2015 in obsws_set_current_scene()
Issue
Scene cache optimization can skip necessary scene switches if events are delayed:
pthread_mutex_lock(&conn->scene_mutex);
bool already_current = (conn->current_scene && strcmp(conn->current_scene, scene_name) == 0);
pthread_mutex_unlock(&conn->scene_mutex);
if (already_current) {
obsws_log(conn, OBSWS_LOG_DEBUG, "Already on scene: %s", scene_name);
if (response) {
*response = calloc(1, sizeof(obsws_response_t));
(*response)->success = true;
}
return OBSWS_OK; // ← Returns without actually switching!
}Scenario
- User switches scene via OBS UI: Scene1 → Scene2
- Event notification is delayed (network lag, busy OBS)
- Cache still shows "Scene1"
- Application calls
obsws_set_current_scene(conn, "Scene2", ...) - Function thinks Scene2 is current, returns without switching
- Scene is actually Scene1, not Scene2
Impact
- Rare edge case but could cause confusion
- Application thinks scene switched but it didn't
- Scene gets out of sync with application state
Metadata
Metadata
Assignees
Labels
MEDIUMNot a risk, but definitely would improve functionalityNot a risk, but definitely would improve functionality