summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/mplayer.c19
-rw-r--r--core/timeline/tl_matroska.c4
2 files changed, 11 insertions, 12 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 310559958a..7080c5a02e 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -108,7 +108,6 @@
#ifdef CONFIG_DVBIN
#include "stream/dvbin.h"
#endif
-#include "stream/cache2.h"
//**************************************************************************//
// Playtree
@@ -934,13 +933,13 @@ static int find_new_tid(struct MPContext *mpctx, enum stream_type t)
// Map stream number (as used by libdvdread) to MPEG IDs (as used by demuxer).
static int map_id_from_demuxer(struct demuxer *d, enum stream_type type, int id)
{
- if (d->stream->type == STREAMTYPE_DVD && type == STREAM_SUB)
+ if (d->stream->uncached_type == STREAMTYPE_DVD && type == STREAM_SUB)
id = id & 0x1F;
return id;
}
static int map_id_to_demuxer(struct demuxer *d, enum stream_type type, int id)
{
- if (d->stream->type == STREAMTYPE_DVD && type == STREAM_SUB)
+ if (d->stream->uncached_type == STREAMTYPE_DVD && type == STREAM_SUB)
id = id | 0x20;
return id;
}
@@ -3918,7 +3917,7 @@ static struct track *open_external_file(struct MPContext *mpctx, char *filename,
struct stream *stream = open_stream(filename, &mpctx->opts, &format);
if (!stream)
goto err_out;
- stream_enable_cache_percent(stream, stream_cache,
+ stream_enable_cache_percent(&stream, stream_cache,
opts->stream_cache_min_percent,
opts->stream_cache_seek_min_percent);
// deal with broken demuxers: preselect streams
@@ -4203,10 +4202,7 @@ static void play_current_file(struct MPContext *mpctx)
}
// CACHE2: initial prefill: 20% later: 5% (should be set by -cacheopts)
-#ifdef CONFIG_DVBIN
-goto_enable_cache: ;
-#endif
- int res = stream_enable_cache_percent(mpctx->stream,
+ int res = stream_enable_cache_percent(&mpctx->stream,
opts->stream_cache_size,
opts->stream_cache_min_percent,
opts->stream_cache_seek_min_percent);
@@ -4216,6 +4212,10 @@ goto_enable_cache: ;
stream_set_capture_file(mpctx->stream, opts->stream_capture);
+#ifdef CONFIG_DVBIN
+goto_reopen_demuxer: ;
+#endif
+
//============ Open DEMUXERS --- DETECT file type =======================
mpctx->audio_delay = opts->audio_delay;
@@ -4402,9 +4402,8 @@ goto_enable_cache: ;
if (mpctx->dvbin_reopen) {
mpctx->stop_play = 0;
uninit_player(mpctx, INITIALIZED_ALL - (INITIALIZED_STREAM | INITIALIZED_GETCH2 | (opts->fixed_vo ? INITIALIZED_VO : 0)));
- cache_uninit(mpctx->stream);
mpctx->dvbin_reopen = 0;
- goto goto_enable_cache;
+ goto goto_reopen_demuxer;
}
#endif
diff --git a/core/timeline/tl_matroska.c b/core/timeline/tl_matroska.c
index 98ba635bec..11fcc67583 100644
--- a/core/timeline/tl_matroska.c
+++ b/core/timeline/tl_matroska.c
@@ -141,7 +141,7 @@ static int enable_cache(struct MPContext *mpctx, struct stream **stream,
return -1;
}
- stream_enable_cache_percent(*stream,
+ stream_enable_cache_percent(stream,
opts->stream_cache_size,
opts->stream_cache_min_percent,
opts->stream_cache_seek_min_percent);
@@ -230,7 +230,7 @@ static int find_ordered_chapter_sources(struct MPContext *mpctx,
char *main_filename = mpctx->demuxer->filename;
mp_msg(MSGT_CPLAYER, MSGL_INFO, "This file references data from "
"other sources.\n");
- if (mpctx->demuxer->stream->type != STREAMTYPE_FILE) {
+ if (mpctx->demuxer->stream->uncached_type != STREAMTYPE_FILE) {
mp_msg(MSGT_CPLAYER, MSGL_WARN, "Playback source is not a "
"normal disk file. Will not search for related files.\n");
} else {