Skip to content

Commit 0066076

Browse files
author
FlyingRat
committed
[dvdplayer] fixes PGS subtitles
1 parent 977a4ba commit 0066076

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ int CDVDOverlayCodecFFmpeg::Decode(DemuxPacket *pPacket)
186186
// for pgs subtitles the packet pts of the end_segments are wrong
187187
// instead use the subtitle pts to calc the offset here
188188
// see http://git.videolan.org/?p=ffmpeg.git;a=commit;h=2939e258f9d1fff89b3b68536beb931b54611585
189-
if (m_Subtitle.pts != DVD_NOPTS_VALUE)
189+
190+
if (m_Subtitle.pts != AV_NOPTS_VALUE && pPacket->pts != DVD_NOPTS_VALUE)
190191
{
191192
pts_offset = m_Subtitle.pts - pPacket->pts ;
192193
}

0 commit comments

Comments
 (0)