diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2014-09-26 19:56:40 +0200 |
---|---|---|
committer | Rainer Hochecker <fernetmenta@online.de> | 2014-09-26 19:56:40 +0200 |
commit | ab7c55fc47cd2a20837b717979ecbd37fe50eacb (patch) | |
tree | 3574408c5782c19578b68baa836f2033a211c88d | |
parent | 14cd50391b67ff461dbfbfd40db4341e0f9eb725 (diff) | |
parent | 33ecbf84af6cd890ffb6a2562e8d4b6ce65729e5 (diff) |
Merge pull request #5413 from FernetMenta/ass
dvdplayer: fix ass subs for AV_CODEC_ID_ASS after ffmpeg bump to 2.4
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp index 7cd6c2d11f..755eb6b7ee 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp @@ -71,6 +71,8 @@ int CDVDOverlayCodecSSA::Decode(DemuxPacket *pPacket) return OC_ERROR; double pts = pPacket->dts != DVD_NOPTS_VALUE ? pPacket->dts : pPacket->pts; + if (pts == DVD_NOPTS_VALUE) + pts = 0; uint8_t *data = pPacket->pData; int size = pPacket->iSize; double duration = pPacket->duration; @@ -118,6 +120,14 @@ int CDVDOverlayCodecSSA::Decode(DemuxPacket *pPacket) else m_libass->DecodeDemuxPkt((char*)data, size, pts, duration); + if (m_pOverlay && m_pOverlay->iPTSStartTime == pts) + { + if (m_pOverlay->iPTSStopTime < pts + duration) + m_pOverlay->iPTSStopTime = pts + duration; + m_output = true; + return OC_OVERLAY; + } + if(m_pOverlay) { /* there will only ever be one active, so we |