summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-23 00:54:08 +0100
committerwm4 <wm4@nowhere>2014-01-23 00:54:08 +0100
commitaf5c393d2c0b508b0fbd68f18fb9d0b4f34c61ca (patch)
tree8f02525e99f033840b85432510e6268458887e80 /player
parent16534bbd8181a09cc56ec58f98a79b465af8a40d (diff)
downloadmpv-af5c393d2c0b508b0fbd68f18fb9d0b4f34c61ca.tar.bz2
mpv-af5c393d2c0b508b0fbd68f18fb9d0b4f34c61ca.tar.xz
demux_mkv: nicer edition output
If there's more than one edition, print the list of editions, including the edition name, whether the edition is selected, whether the edition is default, and the command line option to select the edition. (Similar to stream list.) Move reading the tags to a separate function process_tags(), which is called when all other state is parsed. Otherwise, that tags will be lost if chapters are read after the tags.
Diffstat (limited to 'player')
-rw-r--r--player/loadfile.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index d673a176c2..9116a0c0df 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -263,9 +263,19 @@ static void print_file_properties(struct MPContext *mpctx)
}
}
struct demuxer *demuxer = mpctx->master_demuxer;
- if (demuxer->num_editions > 1)
- MP_INFO(mpctx, "Playing edition %d of %d (--edition=%d).\n",
- demuxer->edition + 1, demuxer->num_editions, demuxer->edition);
+ if (demuxer->num_editions > 1) {
+ for (int n = 0; n < demuxer->num_editions; n++) {
+ struct demux_edition *edition = &demuxer->editions[n];
+ MP_INFO(mpctx, "[edition] %3s --edition=%d",
+ n == demuxer->edition ? "(+)" : "", n);
+ char *name = mp_tags_get_str(edition->metadata, "title");
+ if (name)
+ MP_INFO(mpctx, " '%s'", name);
+ if (edition->default_edition)
+ MP_INFO(mpctx, " (*)");
+ MP_INFO(mpctx, "\n");
+ }
+ }
for (int t = 0; t < STREAM_TYPE_COUNT; t++) {
for (int n = 0; n < mpctx->num_tracks; n++)
if (mpctx->tracks[n]->type == t)