# HG changeset patch # User atmos4 # Date 1030809550 0 # Node ID eee464fa02c1c71d02b33e0b211247237490e52f # Parent 69cc665855dc6d9642ef0e3d0d665c0fcbf1027b fix cache disable for live.com diff -r 69cc665855dc -r eee464fa02c1 libmpdemux/cache2.c --- a/libmpdemux/cache2.c Sat Aug 31 15:55:03 2002 +0000 +++ b/libmpdemux/cache2.c Sat Aug 31 15:59:10 2002 +0000 @@ -200,12 +200,11 @@ int ss=(stream->type==STREAMTYPE_VCD)?VCD_SECTOR_DATA:STREAM_BUFFER_SIZE; cache_vars_t* s; -// this check is bad! for example DVD, CDDA etc support uses stream but fd=-1 ! -// if (stream->fd < 0) { -// // The stream has no 'fd' behind it, so is non-cacheable -// mp_msg(MSGT_CACHE,MSGL_STATUS,"\rThis stream is non-cacheable\n"); -// return 1; -// } + if (stream->type==STREAMTYPE_STREAM && stream->fd < 0) { + // The stream has no 'fd' behind it, so is non-cacheable + mp_msg(MSGT_CACHE,MSGL_STATUS,"\rThis stream is non-cacheable\n"); + return 1; + } if(size<32*1024) size=32*1024; // 32kb min s=cache_init(size,ss); diff -r 69cc665855dc -r eee464fa02c1 mplayer.c --- a/mplayer.c Sat Aug 31 15:55:03 2002 +0000 +++ b/mplayer.c Sat Aug 31 15:59:10 2002 +0000 @@ -1021,11 +1021,10 @@ int len; FILE *f; current_module="dumpstream"; -// this check is bad! for example DVD, CDDA etc support uses stream but fd=-1 ! -// if(stream->fd<0){ -// mp_msg(MSGT_CPLAYER,MSGL_FATAL,"Cannot dump this stream - no 'fd' available\n"); -// exit_player(MSGTR_Exit_error); -// } + if(stream->type==STREAMTYPE_STREAM && stream->fd<0){ + mp_msg(MSGT_CPLAYER,MSGL_FATAL,"Cannot dump this stream - no 'fd' available\n"); + exit_player(MSGTR_Exit_error); + } stream_reset(stream); stream_seek(stream,stream->start_pos); f=fopen(stream_dump_name,"wb");