From 8f167a73b832996966190262c2f9ac7a8c9a5a19 Mon Sep 17 00:00:00 2001 From: aurel Date: Fri, 13 Jul 2007 21:15:24 +0000 Subject: add support for subtitles thru lavf git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23778 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index ddfb85dbb2..b1483f787b 100644 --- a/command.c +++ b/command.c @@ -1149,6 +1149,8 @@ static int mp_property_sub_pos(m_option_t * prop, int action, void *arg, } } +char *demux_lavf_sub_lang(demuxer_t *demuxer, int track_num); + /// Selected subtitles (RW) static int mp_property_sub(m_option_t * prop, int action, void *arg, MPContext * mpctx) @@ -1203,6 +1205,13 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg, } #endif +#ifdef USE_LIBAVFORMAT + if (mpctx->demuxer->type == DEMUXER_TYPE_LAVF && dvdsub_id >= 0) { + char *lang = demux_lavf_sub_lang(mpctx->demuxer, dvdsub_id); + snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang); + return M_PROPERTY_OK; + } +#endif if (mpctx->demuxer->type == DEMUXER_TYPE_MATROSKA && dvdsub_id >= 0) { char lang[40] = MSGTR_Unknown; demux_mkv_get_sub_lang(mpctx->demuxer, dvdsub_id, lang, 9); -- cgit v1.2.3