private void ParseMp4(FileStream fs) { int count = 0; Position = 0; fs.Seek(0, SeekOrigin.Begin); bool moreBytes = true; while (moreBytes) { moreBytes = InitializeSizeAndName(fs); if (Size < 8) return; if (Name == "moov" && Moov != null) Moov = new Moov(fs, Position); count++; if (count > 100) break; if (Position > (ulong)fs.Length) break; fs.Seek((long)Position, SeekOrigin.Begin); } fs.Close(); }
private void ParseMp4(FileStream fs) { int count = 0; pos = 0; fs.Seek(0, SeekOrigin.Begin); bool moreBytes = true; while (moreBytes) { moreBytes = InitializeSizeAndName(fs); if (size < 8) return; if (name == "moov") Moov = new Moov(fs, pos); count++; if (count > 100) break; if (pos > (ulong)fs.Length) break; fs.Seek((long)pos, SeekOrigin.Begin); } fs.Close(); }