diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-07-08 05:35:58 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-07-08 05:35:58 +0400 |
commit | 60c51d667a34f1cd4beeeb2e21c972451ef39547 (patch) | |
tree | b9f731d479504355bc44a8b3ac3eb92f1948b99c /src/filters/parser/MpegSplitter | |
parent | dd9fecd8ed3c582ba4a66538dbc3fff8bb0c4d92 (diff) |
Fix : MPEGSplitter, MPG/VOB - export a subtitle pin only then subtitles present in file.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3343 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MpegSplitter')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp index 685c6f7a6..c1691703f 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp @@ -171,16 +171,27 @@ HRESULT CMpegSplitterFile::Init(IAsyncReader* pAsyncReader) }
// Add fake Subtitle stream ...
- if(m_streams[video].GetCount()) {
- if (!m_bIsHdmv && m_streams[subpic].GetCount()) {
+ if(m_type == ts) {
+ if(m_streams[video].GetCount()) {
+ if (!m_bIsHdmv && m_streams[subpic].GetCount()) {
+ stream s;
+ s.pid = NO_SUBTITLE_PID;
+ s.mt.majortype = m_streams[subpic].GetHead().mt.majortype;
+ s.mt.subtype = m_streams[subpic].GetHead().mt.subtype;
+ s.mt.formattype = m_streams[subpic].GetHead().mt.formattype;
+ m_streams[subpic].Insert(s, this);
+ } else {
+ AddHdmvPGStream(NO_SUBTITLE_PID, "---");
+ }
+ }
+ } else {
+ if(m_streams[video].GetCount() && m_streams[subpic].GetCount()) {
stream s;
s.pid = NO_SUBTITLE_PID;
s.mt.majortype = m_streams[subpic].GetHead().mt.majortype;
s.mt.subtype = m_streams[subpic].GetHead().mt.subtype;
s.mt.formattype = m_streams[subpic].GetHead().mt.formattype;
m_streams[subpic].Insert(s, this);
- } else {
- AddHdmvPGStream(NO_SUBTITLE_PID, "---");
}
}
|