1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 14:52:43 +00:00

player: enable no-video subtitle display on coverart too

Coverart mode has the same issue as no-video mode, except that the video
chain is fully active. It shows only 1 frame at the start, which would
normally mean that only the subtitle at timestamp 0 is shown. Use the
no-video subtitle rendering mode in this case instead.

(This still doesn't handle subtitle display when playing cover-art
without audio, or playing a single image. This is because there's
nothing that will advance playback_pts.)
This commit is contained in:
wm4 2016-10-31 13:55:32 +01:00
parent bc77565838
commit 8fad4b8eab
2 changed files with 2 additions and 2 deletions

View File

@ -1095,7 +1095,7 @@ void run_playloop(struct MPContext *mpctx)
handle_dummy_ticks(mpctx);
update_osd_msg(mpctx);
if (!mpctx->vo_chain)
if (mpctx->video_status == STATUS_EOF)
update_subtitles(mpctx, mpctx->playback_pts);
handle_eof(mpctx);

View File

@ -115,7 +115,7 @@ static bool update_subtitle(struct MPContext *mpctx, double video_pts,
// Handle displaying subtitles on VO with no video being played. This is
// quite differently, because normally subtitles are redrawn on new video
// frames, using the video frames' timestamps.
if (mpctx->video_out && !mpctx->vo_chain) {
if (mpctx->video_out && mpctx->video_status == STATUS_EOF) {
if (osd_get_force_video_pts(mpctx->osd) != video_pts) {
osd_set_force_video_pts(mpctx->osd, video_pts);
osd_query_and_reset_want_redraw(mpctx->osd);