summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-21 23:48:20 +0100
committerwm4 <wm4@nowhere>2014-12-21 23:48:20 +0100
commit49d01d81e0d6c15c9a73fb8420eaabbad78dc56e (patch)
treeb9e9a48d6846e8c3ea6a61c41c8f43a0e8b7dc26 /player
parentdc0b0cdeb094d132009c80fda5efa6dae1af5540 (diff)
downloadmpv-49d01d81e0d6c15c9a73fb8420eaabbad78dc56e.tar.bz2
mpv-49d01d81e0d6c15c9a73fb8420eaabbad78dc56e.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/sub.c4
1 files changed, 1 insertions, 3 deletions
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);
}
}