command: use "title" tag for media-title property if available

In connection with the previous commit, this will use the Matroska title
for the media-title property.
This commit is contained in:
wm4 2013-05-15 15:06:21 +02:00
parent c2f96b020d
commit 4930681e7a
1 changed files with 6 additions and 3 deletions

View File

@ -181,11 +181,14 @@ static int mp_property_media_title(m_option_t *prop, int action, void *arg,
char *name = NULL;
if (mpctx->resolve_result)
name = mpctx->resolve_result->title;
if (name && name[0]) {
if (name && name[0])
return m_property_strdup_ro(prop, action, arg, name);
} else {
return mp_property_filename(prop, action, arg, mpctx);
if (mpctx->master_demuxer) {
name = demux_info_get(mpctx->master_demuxer, "title");
if (name && name[0])
return m_property_strdup_ro(prop, action, arg, name);
}
return mp_property_filename(prop, action, arg, mpctx);
}
static int mp_property_stream_path(m_option_t *prop, int action, void *arg,