mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
check for -dumpstream file writes, patch by Eric Lammerts <eric@lammerts.org>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10226 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
9157b3e189
commit
ca9eeec2eb
12
mplayer.c
12
mplayer.c
@ -1303,9 +1303,17 @@ if(stream_dump_type==5){
|
|||||||
}
|
}
|
||||||
while(!stream->eof){
|
while(!stream->eof){
|
||||||
len=stream_read(stream,buf,4096);
|
len=stream_read(stream,buf,4096);
|
||||||
if(len>0) fwrite(buf,len,1,f);
|
if(len>0) {
|
||||||
|
if(fwrite(buf,len,1,f) != 1) {
|
||||||
|
mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name);
|
||||||
|
exit_player(MSGTR_Exit_error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fclose(f)) {
|
||||||
|
mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_ErrorWritingFile,stream_dump_name);
|
||||||
|
exit_player(MSGTR_Exit_error);
|
||||||
}
|
}
|
||||||
fclose(f);
|
|
||||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped);
|
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_CoreDumped);
|
||||||
exit_player_with_rc(MSGTR_Exit_eof, 0);
|
exit_player_with_rc(MSGTR_Exit_eof, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user