Working on new sub format

This commit is contained in:
niksedk 2015-08-01 14:58:27 +02:00
parent 37e10e65eb
commit 44f5d5672b

View File

@ -711,7 +711,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
int numberOfPaletteEntries = buffer[21] + (buffer[20] << 8); int numberOfPaletteEntries = buffer[21] + (buffer[20] << 8);
for (int i = 0; i < numberOfPaletteEntries; i++) for (int i = 0; i < numberOfPaletteEntries; i++)
{ {
PaletteUpdates.Add(new Palette() PaletteUpdates.Add(new Palette
{ {
PaletteEntryId = buffer[idx++], PaletteEntryId = buffer[idx++],
Y = buffer[idx++], Y = buffer[idx++],
@ -1008,6 +1008,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
LoadSubtitleFromM2Ts(subtitle, fs); LoadSubtitleFromM2Ts(subtitle, fs);
} }
} }
subtitle.Renumber();
} }
private void LoadSubtitleFromMpeg2PesPackets(Subtitle subtitle, Stream stream) private void LoadSubtitleFromMpeg2PesPackets(Subtitle subtitle, Stream stream)
@ -1044,7 +1045,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
} }
} }
public void LoadSubtitleFromM2Ts(Subtitle subtitle, Stream ms) private void LoadSubtitleFromM2Ts(Subtitle subtitle, Stream ms)
{ {
var subtitlePackets = new List<Packet>(); var subtitlePackets = new List<Packet>();
const int packetLength = 188; const int packetLength = 188;