path: root/player/sub.c
diff options
authorwm4 <wm4@nowhere>2014-08-14 23:45:58 +0200
committerwm4 <wm4@nowhere>2014-08-14 23:53:53 +0200
commit498644afafbcff1bf4f4bcdc1bbc8ef41aae9546 (patch)
tree518b9a7257994bb52a42a89fddb05de99281b899 /player/sub.c
parenta7107686d74250d4e4966b661c0e41994df71952 (diff)
sub: call sub_reset() on seeks only
sub_reset() was called on cycling subtitle tracks and on seeking. Since we don't want that subtitles disppear on cycling, sd_lavc.c didn't clear its internal subtitle queue on reset, which meant that seeking with PGS subtitles could leave the subtitle on screen (PGS subtitles usually don't have a duration set). Call it only on seeking, so we can also strictly clear the subtitle queue in sd_lavc. (This still can go very wrong if you disable a subtitle, seek, and enable it again - for example, if used with libavformat that uses "SSA" style demuxed ASS subtitle packets. That shouldn't happen with newer libavformat versions, and the user can "correct" it anyway by executing a seek while the subtitle is selected.)
Diffstat (limited to 'player/sub.c')
1 files changed, 0 insertions, 2 deletions
diff --git a/player/sub.c b/player/sub.c
index d6903c146e..efd2f68464 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -237,7 +237,5 @@ void reinit_subs(struct MPContext *mpctx, int order)
if (order == 1 && sub_has_get_text(dec_sub))
state.render_bitmap_subs = false;
- reset_subtitles(mpctx, order);
osd_set_sub(mpctx->osd, obj, &state);