summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/doc/recordmydesktop.12
-rw-r--r--recordmydesktop/src/init_encoder.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/recordmydesktop/doc/recordmydesktop.1 b/recordmydesktop/doc/recordmydesktop.1
index 12061e2..e8cbb6a 100644
--- a/recordmydesktop/doc/recordmydesktop.1
+++ b/recordmydesktop/doc/recordmydesktop.1
@@ -139,6 +139,8 @@ The following error codes indicate the nature of the error:
.br
12 Cannot attach shared memory to proccess.
.br
+13 Cannot open file for writting.
+.br
.br
.SH OPTIONS
.PP
diff --git a/recordmydesktop/src/init_encoder.c b/recordmydesktop/src/init_encoder.c
index 1ca9ed4..ed1ad53 100644
--- a/recordmydesktop/src/init_encoder.c
+++ b/recordmydesktop/src/init_encoder.c
@@ -40,8 +40,10 @@ void InitEncoder(ProgData *pdata,EncData *enc_data_t){
ogg_stream_init(&(enc_data_t)->m_ogg_vs,y2);
(enc_data_t)->fp=fopen((pdata)->args.filename,"w");
-
-
+ if((enc_data_t)->fp==NULL){
+ fprintf(stderr,"Cannot open file %s for writting!\n",(pdata)->args.filename);
+ exit(13);
+ }
theora_info_init(&(enc_data_t)->m_th_inf);
(enc_data_t)->m_th_inf.frame_width=(pdata)->brwin.rgeom.width;
(enc_data_t)->m_th_inf.frame_height=(pdata)->brwin.rgeom.height;
© All Rights Reserved