diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-12-13 21:58:51 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-12-13 21:58:51 +0300 |
commit | aa9e99622bef4efc78b55399590c31e0fa5e7b39 (patch) | |
tree | c046c4c93ddde34f732204c4105fdaff8d5484f4 /src/subtitles/HdmvSub.cpp | |
parent | 33122d7f66b6ad294d020a55f777c6238e1cd785 (diff) |
FIXED : Some presentation graphics where not displayed
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@923 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/HdmvSub.cpp')
-rw-r--r-- | src/subtitles/HdmvSub.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/subtitles/HdmvSub.cpp b/src/subtitles/HdmvSub.cpp index 52eefb5c7..1c4bda8ce 100644 --- a/src/subtitles/HdmvSub.cpp +++ b/src/subtitles/HdmvSub.cpp @@ -150,7 +150,7 @@ HRESULT CHdmvSub::ParseSample(IMediaSample* pSample) case PRESENTATION_SEG :
TRACE_HDMVSUB ("CHdmvSub:PRESENTATION_SEG %S (size=%d)\n", ReftimeToString(rtStart), m_nSegSize);
- if (ParsePresentationSegment(&SegmentBuffer) > 0)
+ if (ParsePresentationSegment(&SegmentBuffer, rtStart) > 0)
{
m_pCurrentObject->m_rtStart = rtStart;
m_pCurrentObject->m_rtStop = rtStart + 1;
@@ -185,7 +185,7 @@ HRESULT CHdmvSub::ParseSample(IMediaSample* pSample) return hr;
}
-int CHdmvSub::ParsePresentationSegment(CGolombBuffer* pGBuffer)
+int CHdmvSub::ParsePresentationSegment(CGolombBuffer* pGBuffer, REFERENCE_TIME rtStart)
{
COMPOSITION_DESCRIPTOR CompositionDescriptor;
BYTE nObjectNumber;
@@ -200,7 +200,12 @@ int CHdmvSub::ParsePresentationSegment(CGolombBuffer* pGBuffer) if (nObjectNumber > 0)
{
- delete m_pCurrentObject;
+ if (m_pCurrentObject)
+ {
+ m_pCurrentObject->m_rtStop = rtStart;
+ m_pObjects.AddTail (m_pCurrentObject);
+ }
+
m_pCurrentObject = new CompositionObject();
ParseCompositionObject (pGBuffer, m_pCurrentObject);
}
|