summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-21 23:48:20 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:08 +0900
commit2cac69f221e91a9e8eae6010cb92bae33a4587f2 (patch)
tree51ca2b08e732bb360348ed147f4e1067ff23fa61
parent99cca56a99d15966c17accfe20a5fd077f7f2c70 (diff)
downloadmpv-2cac69f221e91a9e8eae6010cb92bae33a4587f2.tar.bz2
mpv-2cac69f221e91a9e8eae6010cb92bae33a4587f2.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.
-rw-r--r--player/sub.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/player/sub.c b/player/sub.c
index 637bf19d48..66f28658e8 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -146,10 +146,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);
}
}