private bool PidExists(ushort pid) { foreach (StreamInfo si in inFile.StreamInfos) if (si.ElementaryPID == pid) return true; return false; }