diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-10-27 00:12:14 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-10-27 00:14:53 +0400 |
commit | 38ff1fe16afc20aa7f774fed2c1691bfa4f2b5c2 (patch) | |
tree | bb7435093939a6a6ffe02524335037703d59a95f /decoder/LAVVideo | |
parent | e3255e6c7f69e06c8a0dc7cb79fad12c9d71c883 (diff) |
Timeout DVD subtitles without a stop time when a new subtitle line arrives.
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r-- | decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp b/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp index 852717f5..2ddc0d31 100644 --- a/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp +++ b/decoder/LAVVideo/subtitles/LAVSubtitleProvider.cpp @@ -313,6 +313,14 @@ void CLAVSubtitleProvider::ProcessSubtitleRect(AVSubtitle *sub, REFERENCE_TIME r if (rtStart == AV_NOPTS_VALUE && sub->rects[0]->forced) { ClearSubtitleRects(); } + if (rtStart != AV_NOPTS_VALUE) { + CAutoLock lock(this); + for (auto it = m_SubFrames.begin(); it != m_SubFrames.end(); it++) { + if ((*it)->rtStop == AV_NOPTS_VALUE) { + (*it)->rtStop = rtStart-1; + } + } + } } for (unsigned i = 0; i < sub->num_rects; i++) { AVSubtitleRect *rect = sub->rects[i]; |