Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix displaying external text subtitles under a rare situation.

If external subs are enabled by default and the first video frame has a
zero timestamp, TextSubtitles gets confused about the start and end time
of the last displayed sub.
  • Loading branch information...
commit e139b299395a545ba289f6c6ad46b9d27d7d5c60 1 parent 87db118
Mark Kendall authored
View
6 mythtv/libs/libmythtv/subtitlescreen.cpp
@@ -361,6 +361,12 @@ void SubtitleScreen::DisplayTextSubtitles(void)
DeleteAllChildren();
SetRedraw();
+ if (playPos == 0)
+ {
+ subs->Unlock();
+ return;
+ }
+
QStringList rawsubs = subs->GetSubtitles(playPos);
if (rawsubs.empty())
{
View
6 mythtv/libs/libmythtv/textsubtitleparser.h
@@ -40,7 +40,11 @@ typedef vector<text_subtitle_t> TextSubtitleList;
class TextSubtitles
{
public:
- TextSubtitles() : m_frameBasedTiming(false) {}
+ TextSubtitles() : m_frameBasedTiming(false)
+ {
+ m_lastReturnedSubtitle.start = 0;
+ m_lastReturnedSubtitle.end = 0;
+ }
virtual ~TextSubtitles() {}
Please sign in to comment.
Something went wrong with that request. Please try again.