summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c6
-rw-r--r--demux/demux.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index e38b0f0c1d..7e0fbac058 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -522,6 +522,7 @@ static struct demuxer *open_given_type(struct mpv_global *global,
.glog = log,
.filename = talloc_strdup(demuxer, stream->url),
.metadata = talloc_zero(demuxer, struct mp_tags),
+ .initializing = true,
};
demuxer->params = params; // temporary during open()
stream_seek(stream, stream->start_pos);
@@ -554,6 +555,7 @@ static struct demuxer *open_given_type(struct mpv_global *global,
"File is not seekable, but there's a cache: enabling seeking.\n");
demuxer->seekable = true;
}
+ demuxer->initializing = false;
return demuxer;
}
@@ -724,6 +726,8 @@ int demux_info_add_bstr(demuxer_t *demuxer, struct bstr opt, struct bstr param)
if (oldval) {
if (bstrcmp0(param, oldval) == 0)
return 0;
+ }
+ if (!demuxer->initializing) {
MP_INFO(demuxer, "Demuxer info %.*s changed to %.*s\n",
BSTR_P(opt), BSTR_P(param));
}
@@ -740,6 +744,8 @@ int demux_info_print(demuxer_t *demuxer)
if (!info || !info->num_keys)
return 0;
+ demux_info_update(demuxer);
+
mp_info(demuxer->glog, "Clip info:\n");
for (n = 0; n < info->num_keys; n++) {
mp_info(demuxer->glog, " %s: %s\n", info->keys[n], info->values[n]);
diff --git a/demux/demux.h b/demux/demux.h
index 6f9437f2d3..0ef84c0c5f 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -170,6 +170,7 @@ typedef struct demuxer {
// File format allows PTS resets (even if the current file is without)
bool ts_resets_possible;
bool warned_queue_overflow;
+ bool initializing;
struct sh_stream **streams;
int num_streams;