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.
This commit is contained in:
Hendi48
2021-05-08 23:01:38 +02:00
committed by GitHub
parent b8ffb1be0c
commit dff4dc3f99

View File

@@ -3267,7 +3267,7 @@ void CMoviePlayerGui::showSubtitle(neutrino_msg_data_t data)
for (unsigned i = 0; i < subtext.size(); i++) 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); 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); avsubtitle_free(sub);
delete sub; delete sub;