Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasimir666 <casimir666@users.sourceforge.net>2007-04-22 13:32:37 +0400
committerCasimir666 <casimir666@users.sourceforge.net>2007-04-22 13:32:37 +0400
commit035a86a6c29ef8dd1e66cb72e3914a4c64691466 (patch)
treecd08e540ccfdd80b1ce910b8ac31c195e9272562 /src/subtitles/STS.cpp
parent413d9d2f038667e0bc6038bff47631be6ee6002f (diff)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@56 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/STS.cpp')
-rw-r--r--src/subtitles/STS.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/subtitles/STS.cpp b/src/subtitles/STS.cpp
index c2e4cf2ed..a5d77f385 100644
--- a/src/subtitles/STS.cpp
+++ b/src/subtitles/STS.cpp
@@ -447,6 +447,9 @@ static CStringW MBCSSSAToUnicode(CStringW str, int CharSet)
CStringW RemoveSSATags(CStringW str, bool fUnicode, int CharSet)
{
+ str.Replace (L"{\\i1}", L"<i>"); // Casimir666 : tag <i> supported in SRT files!
+ str.Replace (L"{\\i}", L"</i>");
+
for(int i = 0, j; i < str.GetLength(); )
{
if((i = FindChar(str, '{', i, fUnicode, CharSet)) < 0) break;
@@ -1717,22 +1720,23 @@ static bool OpenMPL2(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet)
typedef bool (*STSOpenFunct)(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet);
-typedef struct {STSOpenFunct open; tmode mode;} OpenFunctStruct;
+typedef struct {STSOpenFunct open; tmode mode; exttype type; } OpenFunctStruct;
-static OpenFunctStruct OpenFuncts[] =
+static OpenFunctStruct OpenFuncts[] =
{
- OpenSubRipper, TIME,
- OpenOldSubRipper, TIME,
- OpenSubViewer, TIME,
- OpenMicroDVD, FRAME,
- OpenSami, TIME,
- OpenVPlayer, TIME,
- OpenSubStationAlpha, TIME,
- OpenXombieSub, TIME,
- OpenUSF, TIME,
- OpenMPL2, TIME,
+ OpenSubRipper, TIME, EXTSRT,
+ OpenOldSubRipper, TIME, EXTSRT,
+ OpenSubViewer, TIME, EXTSUB,
+ OpenMicroDVD, FRAME, EXTSSA,
+ OpenSami, TIME, EXTSMI,
+ OpenVPlayer, TIME, EXTSRT,
+ OpenSubStationAlpha, TIME, EXTSSA,
+ OpenXombieSub, TIME, EXTXSS,
+ OpenUSF, TIME, EXTUSF,
+ OpenMPL2, TIME, EXTSRT,
};
+
static int nOpenFuncts = countof(OpenFuncts);
//
@@ -1783,6 +1787,8 @@ void CSimpleTextSubtitle::Copy(CSimpleTextSubtitle& sts)
m_name = sts.m_name;
m_mode = sts.m_mode;
+ m_path = sts.m_path;
+ m_exttype = sts.m_exttype;
m_dstScreenSize = sts.m_dstScreenSize;
m_defaultWrapStyle = sts.m_defaultWrapStyle;
m_collisions = sts.m_collisions;
@@ -2567,6 +2573,7 @@ bool CSimpleTextSubtitle::Open(CTextFile* f, int CharSet, CString name)
}
m_name = name;
+ m_exttype = OpenFuncts[i].type;
m_mode = OpenFuncts[i].mode;
m_encoding = f->GetEncoding();
m_path = f->GetFilePath();