# HG changeset patch # User reimar # Date 1258485835 0 # Node ID 5c39c41f38e8ae7e4674638adb4ce58568ba287a # Parent 195deae202cb6e0896feef5bf45315b8afca9ad7 Deobfuscate the special hack to disable cache for live555. Cache can not be used for it, since it does not provide any data stream, the data is provided to the demuxer "behind MPlayer's back". diff -r 195deae202cb -r 5c39c41f38e8 stream/cache2.c --- a/stream/cache2.c Tue Nov 17 19:14:42 2009 +0000 +++ b/stream/cache2.c Tue Nov 17 19:23:55 2009 +0000 @@ -311,8 +311,7 @@ int ss = stream->sector_size ? stream->sector_size : STREAM_BUFFER_SIZE; cache_vars_t* s; - if (stream->type==STREAMTYPE_STREAM && stream->fd < 0) { - // The stream has no 'fd' behind it, so is non-cacheable + if (stream->flags & STREAM_NON_CACHEABLE) { mp_msg(MSGT_CACHE,MSGL_STATUS,"\rThis stream is non-cacheable\n"); return 1; } diff -r 195deae202cb -r 5c39c41f38e8 stream/stream.h --- a/stream/stream.h Tue Nov 17 19:14:42 2009 +0000 +++ b/stream/stream.h Tue Nov 17 19:23:55 2009 +0000 @@ -41,6 +41,10 @@ #define STREAM_SEEK_BW 2 #define STREAM_SEEK_FW 4 #define STREAM_SEEK (STREAM_SEEK_BW|STREAM_SEEK_FW) +/** This is a HACK for live555 that does not respect the + separation between stream an demuxer and thus is not + actually a stream cache can not be used */ +#define STREAM_NON_CACHEABLE 8 //////////// Open return code #define STREAM_REDIRECTED -2 diff -r 195deae202cb -r 5c39c41f38e8 stream/stream_live555.c --- a/stream/stream_live555.c Tue Nov 17 19:14:42 2009 +0000 +++ b/stream/stream_live555.c Tue Nov 17 19:23:55 2009 +0000 @@ -44,6 +44,7 @@ *file_format = DEMUXER_TYPE_RTP; stream->type = STREAMTYPE_STREAM; + stream->flags = STREAM_NONCACHEABLE; return STREAM_OK; fail: