From 5cbef87c17ce4944893b53796370a1ffeb7a24f0 Mon Sep 17 00:00:00 2001 From: xylosper Date: Mon, 24 Feb 2014 00:43:04 +0900 Subject: command: use DVD volume ID for media-title property Signed-off-by: wm4 Closes #582. --- player/command.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 5f39817d46..4d4f552ffa 100644 --- a/player/command.c +++ b/player/command.c @@ -194,6 +194,15 @@ static int mp_property_media_title(m_option_t *prop, int action, void *arg, name = demux_info_get(mpctx->master_demuxer, "title"); if (name && name[0]) return m_property_strdup_ro(prop, action, arg, name); + struct stream *stream = mpctx->master_demuxer->stream; + if (stream && stream->type == STREAMTYPE_DVD && + stream_control(stream, STREAM_CTRL_GET_DVD_VOLUME_ID, &name) && + name) + { + int r = m_property_strdup_ro(prop, action, arg, name); + talloc_free(name); + return r; + } } return mp_property_filename(prop, action, arg, mpctx); } -- cgit v1.2.3