public virtual void Read(BoxReader reader) { this.Offset = (ulong)reader.BaseStream.Position; this.size = reader.ReadUInt32(); if (size == 0) { this.type = BoxTypes.Error; return; } this.type = reader.ReadBoxType(); if (this.size == 1) { this.largeSize = reader.ReadUInt64(); } if (this.expectedType == BoxTypes.Any) { reader.BaseStream.Seek((long)(this.size - 8), SeekOrigin.Current); } else if (this.expectedType == BoxTypes.AnyDescription) { return; } else if (this.type != this.expectedType) { throw new UnexpectedBoxException(this.expectedType, this.type); } }
public virtual void Read(BoxReader reader) { this.Offset = (ulong)reader.BaseStream.Position; this.size = reader.ReadUInt32(); if (size == 0) { this.type = BoxTypes.Error; return; } this.type = reader.ReadBoxType(); if (this.size == 1) { this.largeSize = reader.ReadUInt64(); } if (this.expectedType == BoxTypes.Any) { reader.BaseStream.Seek((long) (this.size - 8), SeekOrigin.Current); } else if (this.expectedType == BoxTypes.AnyDescription) { return; } else if (this.type != this.expectedType) { throw new UnexpectedBoxException(this.expectedType, this.type); } }