Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2625 from hmis/AirTunes_pts

Fix AirTunes pts accuracy
  • Loading branch information...
commit a894e5e6e8e2e4d3e07750aa68c88264ea8dbe21 2 parents 48b61aa + a4e2d5b
@elupus elupus authored
View
9 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp
@@ -51,6 +51,7 @@ CDVDDemuxBXA::CDVDDemuxBXA() : CDVDDemux()
{
m_pInput = NULL;
m_stream = NULL;
+ m_bytes = 0;
memset(&m_header, 0x0, sizeof(Demux_BXA_FmtHeader));
}
@@ -101,7 +102,7 @@ void CDVDDemuxBXA::Dispose()
m_stream = NULL;
m_pInput = NULL;
- m_pts = 0;
+ m_bytes = 0;
memset(&m_header, 0x0, sizeof(Demux_BXA_FmtHeader));
}
@@ -151,9 +152,9 @@ DemuxPacket* CDVDDemuxBXA::Read()
int n = (m_header.channels * m_header.bitsPerSample * m_header.sampleRate)>>3;
if (n > 0)
{
- m_pts += ((double)pPacket->iSize * DVD_TIME_BASE) / n;
- pPacket->dts = m_pts;
- pPacket->pts = m_pts;
+ m_bytes += pPacket->iSize;
+ pPacket->dts = (double)m_bytes * DVD_TIME_BASE / n;
+ pPacket->pts = pPacket->dts;
}
else
{
View
2  xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.h
@@ -76,7 +76,7 @@ class CDVDDemuxBXA : public CDVDDemux
protected:
friend class CDemuxStreamAudioBXA;
CDVDInputStream* m_pInput;
- double m_pts;
+ int64_t m_bytes;
CDemuxStreamAudioBXA *m_stream;
Please sign in to comment.
Something went wrong with that request. Please try again.