summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-11-29 20:05:30 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-11-29 20:05:30 +0000
commit647adf14246b5a123dcb8e0cb9a37db3a5bca871 (patch)
tree7cbf4c34d62c6f304165119aa55b5ec62f3ebfef /recordmydesktop
parent97d04dc832d787183762168a420e640c08276f4d (diff)
fix for lock when recording with 1 fps
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@441 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/register_callbacks.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/recordmydesktop/src/register_callbacks.c b/recordmydesktop/src/register_callbacks.c
index 545c576..8a9105f 100644
--- a/recordmydesktop/src/register_callbacks.c
+++ b/recordmydesktop/src/register_callbacks.c
@@ -90,9 +90,16 @@ void RegisterCallbacks(ProgArgs *args){
struct itimerval value;
struct sigaction time_act,pause_act,end_act;
+
+ if(args->fps!=1){
+ value.it_interval.tv_sec=value.it_value.tv_sec=0;
+ value.it_interval.tv_usec=value.it_value.tv_usec=(1000000)/args->fps;
+ }
+ else{
+ value.it_interval.tv_sec=value.it_value.tv_sec=1;
+ value.it_interval.tv_usec=value.it_value.tv_usec=0;
+ }
- value.it_interval.tv_sec=value.it_value.tv_sec=0;
- value.it_interval.tv_usec=value.it_value.tv_usec=(1000000)/args->fps;
setitimer(ITIMER_REAL,&value,NULL);
time_act.sa_handler=SetExpired;
pause_act.sa_handler=SetPaused;
© All Rights Reserved