From dff4dc3f9934ef5af462d7810f4806ca4fd8df7d Mon Sep 17 00:00:00 2001 From: Hendi48 <32822533+Hendi48@users.noreply.github.com> Date: Sat, 8 May 2021 23:01:38 +0200 Subject: [PATCH] movieplayer: show subtitles for at least 1.5 seconds (#11) SRT subtitles from the web often have split-second end times, making it very hard to read the text in time. --- src/gui/movieplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index a73a69bb8..583dcd499 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -3267,7 +3267,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data) for (unsigned i = 0; i < subtext.size(); i++) g_Font[SNeutrinoSettings::FONT_TYPE_SUBTITLES]->RenderString(x[i], y[i], sw, subtext[i].c_str(), COL_MENUCONTENT_TEXT); - end_time = sub->end_display_time + time_monotonic_ms(); + end_time = std::max(sub->end_display_time, 1500u) + time_monotonic_ms(); } avsubtitle_free(sub); delete sub;