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:
Dudemanguy 2024-10-14 13:57:07 -05:00
parent dfe3edee76
commit d2d8667259
2 changed files with 3 additions and 3 deletions

View File

@ -1803,6 +1803,9 @@ static void play_current_file(struct MPContext *mpctx)
update_screensaver_state(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)
mp_delete_watch_later_conf(mpctx, mpctx->filename);

View File

@ -659,9 +659,6 @@ static void handle_osd_redraw(struct MPContext *mpctx)
if (!want_redraw)
return;
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)