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. --- stream/stream_dvdnav.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'stream/stream_dvdnav.c') diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index ca17846921..537047fe04 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -602,6 +602,13 @@ static int control(stream_t *stream, int cmd, void *arg) handle_cmd(stream, (struct mp_nav_cmd *)arg); return STREAM_OK; } + case STREAM_CTRL_GET_DVD_VOLUME_ID: { + const char *volume = NULL; + if (dvdnav_get_title_string(dvdnav, &volume) != DVDNAV_STATUS_OK || !volume) + return STREAM_ERROR; + *(char**)arg = talloc_strdup(NULL, volume); + return STREAM_OK; + } } return STREAM_UNSUPPORTED; -- cgit v1.2.3