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/playloop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index dcbc1de9ba..6359803fcf 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -181,7 +181,8 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao) clear_audio_output_buffers(mpctx); } - reset_subtitles(mpctx); + reset_subtitles(mpctx, 0); + reset_subtitles(mpctx, 1); mpctx->video_pts = MP_NOPTS_VALUE; mpctx->video_next_pts = MP_NOPTS_VALUE; @@ -271,7 +272,8 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek, if (need_reset) { reinit_video_chain(mpctx); reinit_audio_chain(mpctx); - reinit_subs(mpctx); + reinit_subs(mpctx, 0); + reinit_subs(mpctx, 1); } int demuxer_style = 0; -- cgit v1.2.3