Ticket #10152: FixSSASubclearing.patch

File FixSSASubclearing.patch, 1.3 KB (added by slackerlinux85@…, 9 years ago)
  • mythtv/libs/libmythtv/subtitlescreen.cpp

    diff --git a/mythtv/libs/libmythtv/subtitlescreen.cpp b/mythtv/libs/libmythtv/subtitlescreen.cpp
    index b7d6534..16671d4 100644
    a b void SubtitleScreen::DisplayAVSubtitles(void) 
    204204{
    205205    if (!m_player || !m_subreader)
    206206        return;
     207
     208    VideoOutput    *videoOut = m_player->GetVideoOutput();
     209    VideoFrame *currentFrame = videoOut ? videoOut->GetLastShownFrame() : NULL;
     210
     211    if (!currentFrame || !videoOut)
     212        return;
     213
     214    // RenderAssTrack moved here so it runs every frame(needed to clear subtitles)
     215#ifdef USING_LIBASS
     216    RenderAssTrack(currentFrame->timecode);
     217#endif
    207218
    208219    AVSubtitles* subs = m_subreader->GetAVSubtitles();
    209220    QMutexLocker lock(&(subs->lock));
    210221    if (subs->buffers.empty())
    211222        return;
    212223
    213     VideoOutput    *videoOut = m_player->GetVideoOutput();
    214     VideoFrame *currentFrame = videoOut ? videoOut->GetLastShownFrame() : NULL;
    215 
    216     if (!currentFrame || !videoOut)
    217         return;
    218224
    219225    float tmp = 0.0;
    220226    QRect dummy;
    void SubtitleScreen::DisplayAVSubtitles(void) 
    339344        }
    340345        m_subreader->FreeAVSubtitle(subtitle);
    341346    }
    342 #ifdef USING_LIBASS
    343     RenderAssTrack(currentFrame->timecode);
    344 #endif
    345347}
    346348
    347349void SubtitleScreen::DisplayTextSubtitles(void)