mirror of
https://github.com/Motion-Project/motion.git
synced 2026-03-05 14:56:46 -05:00
Protect framerate during web updates
This commit is contained in:
@@ -1300,7 +1300,7 @@ static void mlp_loopback(struct ctx_cam *cam){
|
||||
static void mlp_parmsupdate(struct ctx_cam *cam){
|
||||
|
||||
/* Check for some config parameter changes but only every second */
|
||||
if (cam->shots != 0) return;
|
||||
if ((cam->shots != 0) || (cam->parms_changed = false)) return;
|
||||
|
||||
draw_init_scale(cam); /* Initialize and validate text_scale */
|
||||
|
||||
@@ -1360,6 +1360,18 @@ static void mlp_parmsupdate(struct ctx_cam *cam){
|
||||
cam->noise = cam->conf->noise_level;
|
||||
}
|
||||
|
||||
if (cam->netcam != NULL){
|
||||
pthread_mutex_lock(&cam->netcam->mutex_parms);
|
||||
cam->netcam->framerate = cam->conf->framerate;
|
||||
pthread_mutex_unlock(&cam->netcam->mutex_parms);
|
||||
}
|
||||
|
||||
if (cam->netcam_high != NULL){
|
||||
pthread_mutex_lock(&cam->netcam_high->mutex_parms);
|
||||
cam->netcam_high->framerate = cam->conf->framerate;
|
||||
pthread_mutex_unlock(&cam->netcam_high->mutex_parms);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void mlp_frametiming(struct ctx_cam *cam){
|
||||
|
||||
Reference in New Issue
Block a user