diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-12-23 00:31:24 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-12-23 00:31:24 +0300 |
commit | fd1f1a433166a3e5a882fbc6db95d6037daf1582 (patch) | |
tree | 9aaed3c9a69d6a05d5a3d0335d3f7a0af2cce0c7 /src/subtitles/HdmvSub.cpp | |
parent | fb2ad349f3fb4bf80702201436035c5121b3e00f (diff) |
FIXED : Bugs on presentation graphics, missing subtitles, better synchronization (new try)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@939 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/HdmvSub.cpp')
-rw-r--r-- | src/subtitles/HdmvSub.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/subtitles/HdmvSub.cpp b/src/subtitles/HdmvSub.cpp index 929ac9ce3..01752af13 100644 --- a/src/subtitles/HdmvSub.cpp +++ b/src/subtitles/HdmvSub.cpp @@ -153,6 +153,7 @@ HRESULT CHdmvSub::ParseSample(IMediaSample* pSample) if (m_pCurrentObject)
{
m_pCurrentObject->m_rtStop = rtStart;
+ m_pObjects.AddTail (m_pCurrentObject);
TRACE_HDMVSUB ("CHdmvSub:HDMV : %S => %S\n", ReftimeToString (m_pCurrentObject->m_rtStart), ReftimeToString(rtStart));
m_pCurrentObject = NULL;
}
@@ -197,7 +198,7 @@ int CHdmvSub::ParsePresentationSegment(CGolombBuffer* pGBuffer) if (nObjectNumber > 0)
{
- ASSERT (m_pCurrentObject == NULL);
+ delete m_pCurrentObject;
m_pCurrentObject = new CompositionObject();
ParseCompositionObject (pGBuffer, m_pCurrentObject);
}
@@ -244,12 +245,6 @@ void CHdmvSub::ParseObject(CGolombBuffer* pGBuffer, USHORT nUnitSize) // #498 }
else
m_pCurrentObject->AppendRLEData (pGBuffer->GetBufferPos(), nUnitSize-4);
-
- if (m_pCurrentObject->IsRLEComplete())
- {
- m_pObjects.AddTail (m_pCurrentObject);
- TRACE_HDMVSUB ("CHdmvSub:HDMV : %S added\n", ReftimeToString (m_pCurrentObject->m_rtStart));
- }
}
}
@@ -286,20 +281,6 @@ void CHdmvSub::ParseCompositionDescriptor(CGolombBuffer* pGBuffer, COMPOSITION_D pCompositionDescriptor->bState = pGBuffer->ReadByte();
}
-
-HRESULT CHdmvSub::UpdateStop(REFERENCE_TIME rtStart, REFERENCE_TIME* rtStop)
-{
- CompositionObject* pObject = FindObject (rtStart);
-
- if (pObject && pObject->m_rtStart == rtStart && pObject->m_rtStop != _I64_MAX)
- {
- *rtStop = pObject->m_rtStop;
- return S_OK;
- }
-
- return S_FALSE;
-}
-
void CHdmvSub::Render(SubPicDesc& spd, REFERENCE_TIME rt, RECT& bbox)
{
CompositionObject* pObject = FindObject (rt);
@@ -342,6 +323,7 @@ HRESULT CHdmvSub::GetTextureSize (POSITION pos, SIZE& MaxTextureSize, SIZE& Vide return E_INVALIDARG;
}
+
void CHdmvSub::Reset()
{
CompositionObject* pObject;
|