xbmc/xbmc — pull request #2666 by FlyingRat (2013-04-28 19:41:52+00:00)
Title: [dvdplayer] fixes PGS subtitles

Statment "if (m_Subtitle.pts != DVD_NOPTS_VALUE)" will never eval to false since ffmpeg sets pts to AV_NOPTS_VALUE. Same with a bunch of other files (TODO).

lib/ffmpeg/libavcodec/utils.c:
static void avcodec_get_subtitle_defaults (AVSubtitle *sub)
{
memset(sub, 0, sizeof(*sub));
sub->pts = AV_NOPTS_VALUE;
}

DVD_NOPTS_VALUE = 0xfff0000000000000
AV_NOPTS_VALUE = 0x8000000000000000

./xbmc/cores/dvdplayer/DVDClock.h:
#define DVD_NOPTS_VALUE (-1LL<<52) // should be possible to represent in both double and int64_t
./lib/ffmpeg/libavutil/avutil.h:
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)