From 2d58234c86e59298de52fec12d1eb59086d68763 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 17 Nov 2012 19:12:13 +0200 Subject: cache: refactor how cache enabling is done Code enabling the cache by default for network streams did that by modifying the value of the "cache" option. This wasn't sane, as multiple streams may be created and all share the same options. Change the code to not modify options but store data in the stream instance instead. Conflicts: core/mplayer.c demux/demux.c stream/cache2.c stream/network.c stream/network.h stream/pnm.c stream/stream.c stream/stream_rtp.c Merged from mplayer2 commit e26070. Note that this doesn't solve any actual bug, as the playlist crashing bug has been fixed before. Since the global cache size option value is not overwritten anymore, the option doesn't need to be restored on end of playback (M_OPT_LOCAL). --- stream/stream_udp.c | 1 - 1 file changed, 1 deletion(-) (limited to 'stream/stream_udp.c') diff --git a/stream/stream_udp.c b/stream/stream_udp.c index 2654a01577..22b9cefc57 100644 --- a/stream/stream_udp.c +++ b/stream/stream_udp.c @@ -91,7 +91,6 @@ udp_stream_open (stream_t *stream, int mode, void *opts, int *file_format) } stream->type = STREAMTYPE_STREAM; - fixup_network_stream_cache (stream); return STREAM_OK; } -- cgit v1.2.3