summaryrefslogtreecommitdiff
path: root/recordmydesktop/src
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r--recordmydesktop/src/init_encoder.c6
1 files changed, 4 insertions, 2 deletions
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