summaryrefslogtreecommitdiff
path: root/rMD-exp/src
diff options
context:
space:
mode:
Diffstat (limited to 'rMD-exp/src')
-rw-r--r--rMD-exp/src/cache_frame.c2
-rw-r--r--rMD-exp/src/poll_damage.c2
-rw-r--r--rMD-exp/src/recordmydesktop.c7
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 */
© All Rights Reserved