summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-10-26 04:34:09 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-10-26 04:34:09 +0000
commitd8de31cc23f9102813fb74c8c98e75a8ee9228b2 (patch)
tree79efb7561521245b29103e673255229a95f0f950
parent177ef988ab1f22e889a8994cf1e7c107c3adae6d (diff)
cancel poll_damage thread
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@120 f606c939-3180-4ac9-a4b8-4b8779d57d0a
-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