summaryrefslogtreecommitdiff
path: root/recordmydesktop/src
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-10-01 15:46:08 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-10-01 15:46:08 +0000
commit44abbcfbb8544322fe9e6d1b464cb138b2b485fc (patch)
treeb2ffc005ba6edea4a728c7253faf9c5f39198fc2 /recordmydesktop/src
parent3f59d16c0a87c2dee1baf754ac6348c260436f12 (diff)
check if file was opened succesfully
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@81 f606c939-3180-4ac9-a4b8-4b8779d57d0a
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