aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2014-09-26 19:56:40 +0200
committerRainer Hochecker <fernetmenta@online.de>2014-09-26 19:56:40 +0200
commitab7c55fc47cd2a20837b717979ecbd37fe50eacb (patch)
tree3574408c5782c19578b68baa836f2033a211c88d
parent14cd50391b67ff461dbfbfd40db4341e0f9eb725 (diff)
parent33ecbf84af6cd890ffb6a2562e8d4b6ce65729e5 (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.cpp10
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