From 3720b3f17d4951ab839418b5cbfd1a85eb74adba Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 24 Dec 2013 17:46:14 +0100 Subject: player: add --secondary-sid for displaying a second subtitle stream This is relatively hacky, but it's Christmas, so it's ok. This does two things: 1. allow selecting two subtitle tracks, and 2. include a hack that renders the second subtitle always as toptitle. See manpage additions how to use this. --- player/osd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/osd.c') diff --git a/player/osd.c b/player/osd.c index 607af6714e..d1af1a6e65 100644 --- a/player/osd.c +++ b/player/osd.c @@ -373,8 +373,8 @@ void set_osd_subtitle(struct MPContext *mpctx, const char *text) { if (!text) text = ""; - if (strcmp(mpctx->osd->sub_text, text) != 0) { - osd_set_sub(mpctx->osd, text); + if (strcmp(mpctx->osd->objs[OSDTYPE_SUB]->sub_text, text) != 0) { + osd_set_sub(mpctx->osd, mpctx->osd->objs[OSDTYPE_SUB], text); if (!mpctx->video_out) { rm_osd_msg(mpctx, OSD_MSG_SUB_BASE); if (text && text[0]) -- cgit v1.2.3