Mercurial > mplayer.hg
comparison mplayer.c @ 10225:785c945f6796
check for -dumpstream file writes, patch by Eric Lammerts <eric@lammerts.org>
author | alex |
---|---|
date | Sat, 31 May 2003 21:50:21 +0000 |
parents | b89d03e939d6 |
children | 3d4c520e71c2 |
comparison
equal
deleted
inserted
replaced
10224:418da3547f85 | 10225:785c945f6796 |
---|---|
1301 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); | 1301 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile); |
1302 exit_player(MSGTR_Exit_error); | 1302 exit_player(MSGTR_Exit_error); |
1303 } | 1303 } |
1304 while(!stream->eof){ | 1304 while(!stream->eof){ |
1305 len=stream_read(stream,buf,4096); | 1305 len=stream_read(stream,buf,4096); |
1306 if(len>0) fwrite(buf,len,1,f); | 1306 if(len>0) { |
1307 } | 1307 if(fwrite(buf,len,1,f) != 1) { |
1308 fclose(f); | 1308 mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); |
1309 exit_player(MSGTR_Exit_error); | |
1310 } | |
1311 } | |
1312 } | |
1313 if(fclose(f)) { | |
1314 mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name); | |
1315 exit_player(MSGTR_Exit_error); | |
1316 } | |
1309 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); | 1317 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped); |
1310 exit_player_with_rc(MSGTR_Exit_eof, 0); | 1318 exit_player_with_rc(MSGTR_Exit_eof, 0); |
1311 } | 1319 } |
1312 | 1320 |
1313 #ifdef USE_DVDREAD | 1321 #ifdef USE_DVDREAD |