summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-26 12:31:09 +0200
committerwm4 <wm4@nowhere>2016-08-26 13:33:38 +0200
commit4121016689668921538317449c0ea9063fc086fc (patch)
treeb95cb98b22a89271af627464894f05f855346dc2 /demux
parentb636b1905822272bdde10ebe5d997396751892bf (diff)
downloadmpv-4121016689668921538317449c0ea9063fc086fc.tar.bz2
mpv-4121016689668921538317449c0ea9063fc086fc.tar.xz
player: don't directly access demuxer->stream
Cleaner and makes it easier to change the underlying stream. mp_property_stream_capture() still directly accesses it directly via demux_run_on_thread(). This is evil, but still somewhat sane and is not getting into the way here. Not sure if I got all field accesses.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c2
-rw-r--r--demux/demux.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 69e66990ff..cfea29b978 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1031,6 +1031,7 @@ static void demux_copy(struct demuxer *dst, struct demuxer *src)
dst->ts_resets_possible = src->ts_resets_possible;
dst->fully_read = src->fully_read;
dst->start_time = src->start_time;
+ dst->is_network = src->is_network;
dst->priv = src->priv;
}
@@ -1172,6 +1173,7 @@ static struct demuxer *open_given_type(struct mpv_global *global,
.log = mp_log_new(demuxer, log, desc->name),
.glog = log,
.filename = talloc_strdup(demuxer, stream->url),
+ .is_network = stream->is_network,
.events = DEMUX_EVENT_ALL,
};
demuxer->seekable = stream->seekable;
diff --git a/demux/demux.h b/demux/demux.h
index 07803d2838..c7d1b8ee1d 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -183,6 +183,7 @@ typedef struct demuxer {
// packets is not slow either (unlike e.g. libavdevice pseudo-demuxers).
// Typical examples: text subtitles, playlists
bool fully_read;
+ bool is_network; // opened directly from a network stream
// Bitmask of DEMUX_EVENT_*
int events;