From 49d01d81e0d6c15c9a73fb8420eaabbad78dc56e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 21 Dec 2014 23:48:20 +0100 Subject: sub: reset sub decoder correctly when cycling subtitles reset_subtitles() works in mpctx->d_sub[], which is set to NULL before calling it from uninit_sub(). This fixes resetting the subtitle when cycling subtitle tracks. Actually, this was probably a feature, because it's annoying if subtitles don't show up when cycling them. But it also can have unintended consequences, so get rid of it. --- player/sub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'player/sub.c') diff --git a/player/sub.c b/player/sub.c index a55cc40527..62fcaeabe2 100644 --- a/player/sub.c +++ b/player/sub.c @@ -161,10 +161,8 @@ void uninit_stream_sub_decoders(struct demuxer *demuxer) void uninit_sub(struct MPContext *mpctx, int order) { if (mpctx->d_sub[order]) { - mpctx->d_sub[order] = NULL; // Note: not free'd. - int obj = order ? OSDTYPE_SUB2 : OSDTYPE_SUB; - osd_set_sub(mpctx->osd, obj, NULL); reset_subtitles(mpctx, order); + mpctx->d_sub[order] = NULL; // Note: not free'd. reselect_demux_streams(mpctx); } } -- cgit v1.2.3