diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-26 06:28:03 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-26 06:28:03 +0000 |
commit | ef155ccbd15bdfca39b755dd8194854422f854e4 (patch) | |
tree | 804ddfdaabd2748833044ca54c7b68b964f7dcde /rMD-exp/src | |
parent | d8de31cc23f9102813fb74c8c98e75a8ee9228b2 (diff) |
made sure compositing managers don't cause a hang
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@121 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/src')
-rw-r--r-- | rMD-exp/src/cache_frame.c | 2 | ||||
-rw-r--r-- | rMD-exp/src/poll_damage.c | 2 | ||||
-rw-r--r-- | rMD-exp/src/recordmydesktop.c | 7 |
3 files changed, 8 insertions, 3 deletions
diff --git a/rMD-exp/src/cache_frame.c b/rMD-exp/src/cache_frame.c index 6f97723..8a1e0ca 100644 --- a/rMD-exp/src/cache_frame.c +++ b/rMD-exp/src/cache_frame.c @@ -189,7 +189,7 @@ void *CacheImageBuffer(void *pdata){ free(yuv[i].u); free(yuv[i].v); } - fprintf(stderr,"Saved %d frames in a total of %d requests",frameno,frames_total); +// fprintf(stderr,"Saved %d frames in a total of %d requests",frameno,frames_total); gzclose(fp); pthread_exit(&errno); } diff --git a/rMD-exp/src/poll_damage.c b/rMD-exp/src/poll_damage.c index 5433bbc..73742f5 100644 --- a/rMD-exp/src/poll_damage.c +++ b/rMD-exp/src/poll_damage.c @@ -31,7 +31,7 @@ void *PollDamage(void *pdata){ Damage damage; XEvent event; - int inserts=0; + inserts=0; damage= XDamageCreate( ((ProgData *)pdata)->dpy, ((ProgData *)pdata)->brwin.windowid, XDamageReportRawRectangles); diff --git a/rMD-exp/src/recordmydesktop.c b/rMD-exp/src/recordmydesktop.c index c6b059a..24037ce 100644 --- a/rMD-exp/src/recordmydesktop.c +++ b/rMD-exp/src/recordmydesktop.c @@ -208,6 +208,8 @@ int main(int argc,char **argv){ pthread_join(image_capture_t,NULL); fprintf(stderr,"Shutting down."); + //if no damage events have been received the thread will get stuck + pthread_cond_broadcast(&pdata.image_buffer_ready); if(pdata.args.encOnTheFly) pthread_join(image_encode_t,NULL); else @@ -257,7 +259,10 @@ int main(int argc,char **argv){ shmctl (shminfo.shmid, IPC_RMID, 0); } fprintf(stderr,"\n"); - XCloseDisplay(pdata.dpy); + + if(pdata.args.full_shots || inserts!=1)//otherwise it will hang + XCloseDisplay(pdata.dpy); + /** Encoding */ |