mirror of https://github.com/mpv-player/mpv
player: move a redraw_subs edgecase to loadfile
Putting this in handle_osd_redraw was strange and my own comments didn't help me remember what this was even for. The actual purpose here is that the osd needs to be redrawn in the still image edge case as you go through a playlist. This is because all the logic with checking timestamps isn't applicable and we need to essentially clear the screen with another redraw. Clearly, it makes more sense for this to be done when a new file is successfully loaded and not in the osd_redraw where that happens to work but was called repeatedly pointlessly.
This commit is contained in:
parent
dfe3edee76
commit
d2d8667259
|
@ -1803,6 +1803,9 @@ static void play_current_file(struct MPContext *mpctx)
|
||||||
update_screensaver_state(mpctx);
|
update_screensaver_state(mpctx);
|
||||||
clear_playlist_paths(mpctx);
|
clear_playlist_paths(mpctx);
|
||||||
|
|
||||||
|
// Clear out subs from the previous file if the video track is a still image.
|
||||||
|
redraw_subs(mpctx);
|
||||||
|
|
||||||
if (watch_later)
|
if (watch_later)
|
||||||
mp_delete_watch_later_conf(mpctx, mpctx->filename);
|
mp_delete_watch_later_conf(mpctx, mpctx->filename);
|
||||||
|
|
||||||
|
|
|
@ -659,9 +659,6 @@ static void handle_osd_redraw(struct MPContext *mpctx)
|
||||||
if (!want_redraw)
|
if (!want_redraw)
|
||||||
return;
|
return;
|
||||||
vo_redraw(mpctx->video_out);
|
vo_redraw(mpctx->video_out);
|
||||||
// Even though we just redrew, it may need to be done again for certain
|
|
||||||
// cases of subtitles on an image.
|
|
||||||
redraw_subs(mpctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_underruns(struct MPContext *mpctx)
|
static void clear_underruns(struct MPContext *mpctx)
|
||||||
|
|
Loading…
Reference in New Issue