diff options
author | aurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-13 21:15:24 +0000 |
---|---|---|
committer | aurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-13 21:15:24 +0000 |
commit | 8f167a73b832996966190262c2f9ac7a8c9a5a19 (patch) | |
tree | 8b6365997d1b95f2a9bbb2d8d9d2d35d737a4b3d /command.c | |
parent | 21cc99911c385ef4dc6e66ddf695903d787d2d7b (diff) | |
download | mpv-8f167a73b832996966190262c2f9ac7a8c9a5a19.tar.bz2 mpv-8f167a73b832996966190262c2f9ac7a8c9a5a19.tar.xz |
add support for subtitles thru lavf
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23778 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); |