diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-10-23 14:10:25 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-10-23 14:10:25 +0400 |
commit | 1e9db41cb19d63847c73a613b45b45b96559cad0 (patch) | |
tree | 3f741c9686db53705a474f682e3707b7b48d91f5 /src | |
parent | 824140fc35daef97afe7196f96f9c1eecaf718a6 (diff) |
Fix : MPEGSplitter, fix A/V sync issue on MPEG-TS with H.264 stream; some MPEG-TS with H.264 stream was unable to playback with MPC software decoder. Ticket #98;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3791 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitter.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp index aa1ba6a3e..ad83bf734 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp @@ -1790,6 +1790,8 @@ HRESULT CMpegSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p) m_p->RemoveAt(0, start - m_p->GetData());
}
+ REFERENCE_TIME rtStart = Packet::INVALID_TIME, rtStop = Packet::INVALID_TIME;
+
for(POSITION pos = m_pl.GetHeadPosition(); pos; m_pl.GetNext(pos)) {
if(pos == m_pl.GetHeadPosition()) {
continue;
@@ -1802,7 +1804,17 @@ HRESULT CMpegSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p) m_fHasAccessUnitDelimiters = true;
}
- if((pData[4]&0x1f) == 0x09 || !m_fHasAccessUnitDelimiters && pPacket->rtStart != Packet::INVALID_TIME) {
+ if((pData[4]&0x1f) == 0x09 || (!m_fHasAccessUnitDelimiters && pPacket->rtStart != Packet::INVALID_TIME)) {
+ if (pPacket->rtStart == Packet::INVALID_TIME && rtStart != Packet::INVALID_TIME) {
+ pPacket->rtStart = rtStart;
+ pPacket->rtStop = rtStop;
+ }
+/*
+ if(pPacket->rtStart == Packet::INVALID_TIME) {
+ continue;
+ }
+*/
+
p = m_pl.RemoveHead();
while(pos != m_pl.GetHeadPosition()) {
@@ -1815,6 +1827,10 @@ HRESULT CMpegSplitterOutputPin::DeliverPacket(CAutoPtr<Packet> p) return hr;
}
}
+ if (rtStart == Packet::INVALID_TIME) {
+ rtStart = pPacket->rtStart;
+ rtStop = pPacket->rtStop;
+ }
}
return S_OK;
|