Mercurial > mplayer.hg
diff mplayer.c @ 30360:c74a5f8ffab3
Change code to allow playing a stream even if enabling the cache failed
while still handling it when the user aborts the cache fill.
author | reimar |
---|---|
date | Sat, 23 Jan 2010 12:13:28 +0000 |
parents | 6fb92182aff3 |
children | 8339bca8e4b4 |
line wrap: on
line diff
--- a/mplayer.c Sat Jan 23 11:51:13 2010 +0000 +++ b/mplayer.c Sat Jan 23 12:13:28 2010 +0000 @@ -3281,10 +3281,12 @@ // CACHE2: initial prefill: 20% later: 5% (should be set by -cacheopts) goto_enable_cache: if(stream_cache_size>0){ + int res; current_module="enable_cache"; - if(!stream_enable_cache(mpctx->stream,stream_cache_size*1024, + res = stream_enable_cache(mpctx->stream,stream_cache_size*1024, stream_cache_size*1024*(stream_cache_min_percent / 100.0), - stream_cache_size*1024*(stream_cache_seek_min_percent / 100.0))) + stream_cache_size*1024*(stream_cache_seek_min_percent / 100.0)); + if(res == 0) if((mpctx->eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY))) goto goto_next_file; }