summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rMD-exp/src/recordmydesktop.c18
-rw-r--r--rMD-exp/src/rmd_cache.c18
2 files changed, 29 insertions, 7 deletions
diff --git a/rMD-exp/src/recordmydesktop.c b/rMD-exp/src/recordmydesktop.c
index 1946a37..c6b059a 100644
--- a/rMD-exp/src/recordmydesktop.c
+++ b/rMD-exp/src/recordmydesktop.c
@@ -240,14 +240,16 @@ int main(int argc,char **argv){
else
fprintf(stderr,"..");
-
if(pdata.args.encOnTheFly)
pthread_join(flush_to_ogg_t,NULL);
-
-
fprintf(stderr,".");
+
+ //this thread will get cancelled instead of joined
+ //this is neccessary to terminate the application, if for some reason
+ //damage events are not delivered(i.e comp windopw managers)
if(!pdata.args.full_shots)
- pthread_join(poll_damage_t,NULL);
+ pthread_cancel(poll_damage_t);
+
fprintf(stderr,".");
if((!pdata.args.noshared)||(!pdata.args.nocondshared)){
XShmDetach (pdata.dpy, &shminfo);
@@ -257,7 +259,15 @@ int main(int argc,char **argv){
fprintf(stderr,"\n");
XCloseDisplay(pdata.dpy);
+/** Encoding */
+
+
+
+
+
+
+/**@_______________________________________________@*/
if(Aborted){
diff --git a/rMD-exp/src/rmd_cache.c b/rMD-exp/src/rmd_cache.c
index eb86aad..bebd29e 100644
--- a/rMD-exp/src/rmd_cache.c
+++ b/rMD-exp/src/rmd_cache.c
@@ -80,11 +80,23 @@ void InitCacheData(ProgData *pdata,EncData *enc_data_t,CacheData *cache_data_t){
//now that've got out buffers and our filenames we start
//creating the needed files
- mkdir(cache_data_t->projname,0777);
+ if(mkdir(cache_data_t->projname,0777)){
+ fprintf(stderr,"Could not create temporary directory %s !!!\n",cache_data_t->projname);
+ exit(13);
+ }
cache_data_t->ifp=gzopen(cache_data_t->imgdata,"wb1f");
- if(!pdata->args.nosound)
+ if(cache_data_t->ifp==NULL){
+ fprintf(stderr,"Could not create temporary file %s !!!\n",cache_data_t->imgdata);
+ exit(13);
+ }
+ if(!pdata->args.nosound){
cache_data_t->afp=fopen(cache_data_t->audiodata,"wb");
-
+ if(cache_data_t->afp==NULL){
+ fprintf(stderr,"Could not create temporary file %s !!!\n",cache_data_t->audiodata);
+ exit(13);
+ }
+ }
+
}
© All Rights Reserved