aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-17 19:23:55 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-17 19:23:55 +0000
commite02a2e7f08a87f2147a149a9a66992965e219fce (patch)
treef1ef4edb07ea8cf1bfbc0f19a195ad711419f16a
parenta81e043f98d79f1e0a47210a0f82062e8b5dbcca (diff)
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". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29930 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/cache2.c3
-rw-r--r--stream/stream.h4
-rw-r--r--stream/stream_live555.c1
3 files changed, 6 insertions, 2 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index acdb111f0b..5d2e69d82f 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -311,8 +311,7 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){
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 --git a/stream/stream.h b/stream/stream.h
index 2bbe443757..4aed24526a 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -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 --git a/stream/stream_live555.c b/stream/stream_live555.c
index 619a8d90af..c36c9ff33a 100644
--- a/stream/stream_live555.c
+++ b/stream/stream_live555.c
@@ -44,6 +44,7 @@ static int open_live_rtsp_sip(stream_t *stream,int mode, void* opts, int* file_f
*file_format = DEMUXER_TYPE_RTP;
stream->type = STREAMTYPE_STREAM;
+ stream->flags = STREAM_NONCACHEABLE;
return STREAM_OK;
fail: