From 647adf14246b5a123dcb8e0cb9a37db3a5bca871 Mon Sep 17 00:00:00 2001 From: iovar Date: Thu, 29 Nov 2007 20:05:30 +0000 Subject: 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 --- recordmydesktop/src/register_callbacks.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'recordmydesktop') 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; -- cgit v1.2.3