summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorOliver Freyermuth <o.freyermuth@googlemail.com>2016-01-13 01:47:12 +0100
committerwm4 <wm4@nowhere>2016-01-14 00:36:53 +0100
commit0c9b655477331f9e5cc25bd90b7a3a1a19b43cbc (patch)
tree51f17ab8ef2d455cc71cab16aa05aa6ae4eb79b9 /demux
parent9fb949b49a7e88da0d1c0d0289dba687fe5aa370 (diff)
downloadmpv-0c9b655477331f9e5cc25bd90b7a3a1a19b43cbc.tar.bz2
mpv-0c9b655477331f9e5cc25bd90b7a3a1a19b43cbc.tar.xz
demux_lavf: update metadata with information from AV_PROGRAM on switch.
Need to trigger demux_changed() manually since metadata of tracks and streams is not changed, but demuxer-metadata is still changed on program switch.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index e054d29bbd..1b3105170d 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -1062,6 +1062,12 @@ redo:
goto redo;
}
priv->cur_program = prog->progid = program->id;
+
+ mp_tags_copy_from_av_dictionary(demuxer->metadata, priv->avfc->programs[p]->metadata);
+ update_metadata(demuxer, NULL);
+ // Enforce metadata update even if no explicit METADATA_UPDATED since we switched program.
+ demux_changed(demuxer, DEMUX_EVENT_METADATA);
+
return DEMUXER_CTRL_OK;
}
case DEMUXER_CTRL_RESYNC: