diff options
author | wm4 <wm4@nowhere> | 2014-04-30 11:46:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-30 11:46:40 +0200 |
commit | df8b99490ca15f0d55681a30bea8e81dd529ea12 (patch) | |
tree | 20201e8d93892f30a646d11515f2060a179dc563 /demux/demux.c | |
parent | c78142a973827b9e6f9d8361c7a1e3d1050a5bfb (diff) | |
download | mpv-df8b99490ca15f0d55681a30bea8e81dd529ea12.tar.bz2 mpv-df8b99490ca15f0d55681a30bea8e81dd529ea12.tar.xz |
demux: add hack to get initial ICY info to be printed
Newly added metadata (such as the ICY title, sent some seconds after
opening the stream) simply wasn't printed.
This problem doesn't exist in git master.
Fixes #753.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 6 |
1 files changed, 6 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]); |