mirror of https://github.com/mpv-player/mpv
player/sub: avoid pointlessly redecoding subs
This was added in 8f043de961
but the
redecode is a special case that is only ever needed for subtitles on a
still image. Normal video never needs this so just modify the
conditional to avoid doing more work.
This commit is contained in:
parent
4c24eae220
commit
dfe3edee76
|
@ -130,8 +130,8 @@ static bool update_subtitle(struct MPContext *mpctx, double video_pts,
|
|||
// Check if we need to update subtitles for these special cases. Always
|
||||
// update on discontinuities like seeking or a new file.
|
||||
if (sub_updated || mpctx->redraw_subs || osd_pts == MP_NOPTS_VALUE) {
|
||||
// Always force a redecode of all packets if we have a refresh.
|
||||
if (mpctx->redraw_subs)
|
||||
// Always force a redecode of all packets if we seek on a still image.
|
||||
if (mpctx->redraw_subs && still_image)
|
||||
sub_redecode_cached_packets(dec_sub);
|
||||
|
||||
// Handle displaying subtitles on terminal; never done for secondary subs
|
||||
|
|
Loading…
Reference in New Issue