From 498644afafbcff1bf4f4bcdc1bbc8ef41aae9546 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 14 Aug 2014 23:45:58 +0200 Subject: 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.) --- player/loadfile.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 18a225568e..f3861e25eb 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -64,8 +64,6 @@ static void reselect_demux_streams(struct MPContext *mpctx); static void uninit_sub(struct MPContext *mpctx, int order) { - if (mpctx->d_sub[order]) - sub_reset(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); -- cgit v1.2.3