Fix searching for sync byte in broken files

Related to performance fix 762ae24278
This commit is contained in:
Nikolaj Olsson 2019-11-04 05:32:51 +01:00
parent deb7e9c2f1
commit 73152895f9

View File

@ -143,7 +143,13 @@ namespace Nikse.SubtitleEdit.Core.TransportStream
}
else
{
// sync byte not found - search for it (will be very slow!)
if (IsM2TransportStream)
{
position -= m2TsTimeCodeBuffer.Length;
}
position++;
ms.Seek(position, SeekOrigin.Begin);
}
}
foreach (var pid in SubtitlePackets.GroupBy(p => p.PacketId))