Fix loading subtitles from matroska files

Originally committed to SVN as r5801.
This commit is contained in:
Thomas Goyne 2011-10-29 04:16:31 +00:00
parent 6315192e2b
commit 402ba0e89d
1 changed files with 4 additions and 3 deletions

View File

@ -103,10 +103,11 @@ static void read_subtitles(agi::ProgressSink *ps, MatroskaFile *file, MkvStdIO *
// Process SSA/ASS
if (!srt) {
long order = 0, layer = 0;
blockString.BeforeFirst(',', &blockString).ToLong(&order);
blockString.BeforeFirst(',', &blockString).ToLong(&layer);
wxString afterOrder, afterLayer;
blockString.BeforeFirst(',', &afterOrder).ToLong(&order);
afterOrder.BeforeFirst(',', &afterLayer).ToLong(&layer);
subList[order] = wxString::Format("Dialogue: %d,%s,%s,%s", layer, subStart.GetASSFormated(), subEnd.GetASSFormated(), blockString);
subList[order] = wxString::Format("Dialogue: %d,%s,%s,%s", layer, subStart.GetASSFormated(), subEnd.GetASSFormated(), afterLayer);
}
// Process SRT
else {